@clawplays/ospec-cli 0.3.10 → 1.0.0

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.
Files changed (169) hide show
  1. package/README.md +36 -57
  2. package/SKILL.md +3 -0
  3. package/assets/for-ai/ar/ai-guide.md +2 -2
  4. package/assets/for-ai/ar/execution-protocol.md +1 -1
  5. package/assets/for-ai/en-US/ai-guide.md +5 -32
  6. package/assets/for-ai/en-US/execution-protocol.md +5 -7
  7. package/assets/for-ai/ja-JP/ai-guide.md +2 -2
  8. package/assets/for-ai/ja-JP/execution-protocol.md +2 -2
  9. package/assets/for-ai/zh-CN/ai-guide.md +3 -3
  10. package/assets/for-ai/zh-CN/execution-protocol.md +3 -3
  11. package/assets/global-skills/claude/ospec-change/SKILL.md +4 -5
  12. package/assets/global-skills/codex/ospec-change/SKILL.md +4 -5
  13. package/assets/global-skills/codex/ospec-change/agents/openai.yaml +1 -1
  14. package/assets/global-skills/codex/ospec-change/skill.yaml +1 -1
  15. package/assets/plugins/registry.json +47 -0
  16. package/assets/project-conventions/ar/workflow-conventions.md +6 -0
  17. package/assets/project-conventions/en-US/workflow-conventions.md +1 -2
  18. package/assets/project-conventions/ja-JP/workflow-conventions.md +6 -0
  19. package/assets/project-conventions/zh-CN/workflow-conventions.md +1 -1
  20. package/dist/advanced/BatchOperations.d.ts +1 -1
  21. package/dist/advanced/BatchOperations.js +1 -1
  22. package/dist/advanced/CachingLayer.d.ts +13 -13
  23. package/dist/advanced/CachingLayer.js +16 -16
  24. package/dist/advanced/FeatureUpdater.d.ts +9 -9
  25. package/dist/advanced/FeatureUpdater.js +14 -14
  26. package/dist/advanced/PerformanceMonitor.d.ts +10 -10
  27. package/dist/advanced/PerformanceMonitor.js +11 -11
  28. package/dist/advanced/StatePersistence.d.ts +11 -11
  29. package/dist/advanced/StatePersistence.js +16 -17
  30. package/dist/advanced/index.d.ts +2 -2
  31. package/dist/advanced/index.js +2 -2
  32. package/dist/cli.d.ts +1 -1
  33. package/dist/cli.js +18 -713
  34. package/dist/commands/ArchiveCommand.d.ts +3 -1
  35. package/dist/commands/ArchiveCommand.js +90 -17
  36. package/dist/commands/BaseCommand.d.ts +8 -8
  37. package/dist/commands/BaseCommand.js +7 -7
  38. package/dist/commands/BatchCommand.d.ts +1 -1
  39. package/dist/commands/BatchCommand.js +1 -1
  40. package/dist/commands/DocsCommand.d.ts +1 -1
  41. package/dist/commands/IndexCommand.d.ts +1 -1
  42. package/dist/commands/IndexCommand.js +1 -1
  43. package/dist/commands/InitCommand.d.ts +1 -1
  44. package/dist/commands/LayoutCommand.d.ts +8 -0
  45. package/dist/commands/LayoutCommand.js +200 -0
  46. package/dist/commands/NewCommand.js +58 -19
  47. package/dist/commands/PluginsCommand.d.ts +35 -1
  48. package/dist/commands/PluginsCommand.js +1370 -45
  49. package/dist/commands/ProgressCommand.d.ts +1 -1
  50. package/dist/commands/ProgressCommand.js +5 -2
  51. package/dist/commands/QueueCommand.js +10 -4
  52. package/dist/commands/RunCommand.js +10 -4
  53. package/dist/commands/SkillCommand.js +22 -381
  54. package/dist/commands/SkillsCommand.d.ts +1 -1
  55. package/dist/commands/SkillsCommand.js +1 -1
  56. package/dist/commands/StatusCommand.d.ts +1 -1
  57. package/dist/commands/StatusCommand.js +7 -3
  58. package/dist/commands/UpdateCommand.d.ts +6 -0
  59. package/dist/commands/UpdateCommand.js +261 -26
  60. package/dist/commands/VerifyCommand.d.ts +2 -1
  61. package/dist/commands/VerifyCommand.js +81 -7
  62. package/dist/commands/WorkflowCommand.d.ts +2 -2
  63. package/dist/commands/WorkflowCommand.js +4 -4
  64. package/dist/commands/index.d.ts +2 -22
  65. package/dist/commands/index.js +4 -44
  66. package/dist/core/constants.d.ts +1 -1
  67. package/dist/core/errors.d.ts +2 -2
  68. package/dist/core/errors.js +2 -2
  69. package/dist/core/index.d.ts +2 -2
  70. package/dist/core/index.js +2 -2
  71. package/dist/core/types.d.ts +8 -4
  72. package/dist/core/types.js +1 -1
  73. package/dist/index.d.ts +2 -2
  74. package/dist/index.js +2 -2
  75. package/dist/scaffolds/ProjectScaffoldPresets.d.ts +1 -1
  76. package/dist/scaffolds/ProjectScaffoldPresets.js +1 -1
  77. package/dist/services/ConfigManager.d.ts +1 -1
  78. package/dist/services/ConfigManager.js +270 -2
  79. package/dist/services/FileService.d.ts +4 -4
  80. package/dist/services/FileService.js +33 -12
  81. package/dist/services/IndexBuilder.d.ts +2 -1
  82. package/dist/services/IndexBuilder.js +47 -17
  83. package/dist/services/Logger.d.ts +2 -2
  84. package/dist/services/Logger.js +2 -2
  85. package/dist/services/PluginRegistryService.d.ts +175 -0
  86. package/dist/services/PluginRegistryService.js +1006 -0
  87. package/dist/services/ProjectAssetService.d.ts +6 -3
  88. package/dist/services/ProjectAssetService.js +28 -21
  89. package/dist/services/ProjectScaffoldCommandService.d.ts +1 -1
  90. package/dist/services/ProjectScaffoldService.d.ts +1 -1
  91. package/dist/services/ProjectService.d.ts +5 -0
  92. package/dist/services/ProjectService.js +592 -10690
  93. package/dist/services/QueueService.d.ts +1 -0
  94. package/dist/services/QueueService.js +24 -9
  95. package/dist/services/RunService.d.ts +1 -0
  96. package/dist/services/RunService.js +29 -13
  97. package/dist/services/SkillParser.d.ts +5 -5
  98. package/dist/services/SkillParser.js +6 -9
  99. package/dist/services/TemplateEngine.d.ts +1 -1
  100. package/dist/services/TemplateEngine.js +1 -1
  101. package/dist/services/TemplateGenerator.d.ts +11 -11
  102. package/dist/services/TemplateGenerator.js +21 -21
  103. package/dist/services/ValidationService.d.ts +5 -5
  104. package/dist/services/ValidationService.js +5 -5
  105. package/dist/services/index.d.ts +1 -1
  106. package/dist/services/index.js +9 -2
  107. package/dist/services/templates/ExecutionTemplateBuilder.d.ts +1 -1
  108. package/dist/services/templates/ExecutionTemplateBuilder.js +90 -90
  109. package/dist/services/templates/ProjectTemplateBuilder.d.ts +1 -1
  110. package/dist/services/templates/ProjectTemplateBuilder.js +6 -6
  111. package/dist/services/templates/TemplateInputFactory.d.ts +1 -1
  112. package/dist/services/templates/TemplateInputFactory.js +3 -1
  113. package/dist/services/templates/templateTypes.js +1 -1
  114. package/dist/tools/build-index.js +677 -758
  115. package/dist/utils/DateUtils.d.ts +5 -5
  116. package/dist/utils/DateUtils.js +5 -5
  117. package/dist/utils/PathUtils.d.ts +6 -2
  118. package/dist/utils/PathUtils.js +14 -4
  119. package/dist/utils/ProjectLayout.d.ts +8 -0
  120. package/dist/utils/ProjectLayout.js +102 -0
  121. package/dist/utils/StringUtils.d.ts +7 -7
  122. package/dist/utils/StringUtils.js +7 -7
  123. package/dist/utils/helpers.d.ts +6 -0
  124. package/dist/utils/helpers.js +39 -1
  125. package/dist/utils/index.d.ts +2 -2
  126. package/dist/utils/index.js +2 -2
  127. package/dist/utils/subcommandHelp.js +9 -4
  128. package/dist/workflow/ArchiveGate.d.ts +1 -1
  129. package/dist/workflow/ArchiveGate.js +1 -1
  130. package/dist/workflow/ConfigurableWorkflow.d.ts +15 -15
  131. package/dist/workflow/ConfigurableWorkflow.js +16 -16
  132. package/dist/workflow/HookSystem.d.ts +8 -8
  133. package/dist/workflow/HookSystem.js +9 -9
  134. package/dist/workflow/IndexRegenerator.d.ts +8 -8
  135. package/dist/workflow/IndexRegenerator.js +12 -12
  136. package/dist/workflow/PluginWorkflowComposer.js +37 -49
  137. package/dist/workflow/SkillUpdateEngine.d.ts +1 -1
  138. package/dist/workflow/SkillUpdateEngine.js +1 -1
  139. package/dist/workflow/VerificationSystem.d.ts +1 -1
  140. package/dist/workflow/VerificationSystem.js +1 -1
  141. package/dist/workflow/WorkflowEngine.d.ts +1 -1
  142. package/dist/workflow/WorkflowEngine.js +1 -1
  143. package/dist/workflow/index.d.ts +2 -2
  144. package/dist/workflow/index.js +1 -1
  145. package/package.json +4 -29
  146. package/scripts/postinstall.js +6 -2
  147. package/dist/adapters/codex-stitch-adapter.js +0 -420
  148. package/dist/adapters/gemini-stitch-adapter.js +0 -408
  149. package/dist/adapters/playwright-checkpoint-adapter.js +0 -2260
  150. package/dist/cli/commands/config.d.ts +0 -4
  151. package/dist/cli/commands/config.js +0 -5
  152. package/dist/cli/commands/feature.d.ts +0 -4
  153. package/dist/cli/commands/feature.js +0 -5
  154. package/dist/cli/commands/index.d.ts +0 -4
  155. package/dist/cli/commands/index.js +0 -5
  156. package/dist/cli/commands/project.d.ts +0 -4
  157. package/dist/cli/commands/project.js +0 -5
  158. package/dist/cli/commands/validate.d.ts +0 -4
  159. package/dist/cli/commands/validate.js +0 -5
  160. package/dist/cli/index.d.ts +0 -4
  161. package/dist/cli/index.js +0 -5
  162. package/dist/services/FeatureManager.d.ts +0 -4
  163. package/dist/services/FeatureManager.js +0 -5
  164. package/dist/services/Validator.d.ts +0 -4
  165. package/dist/services/Validator.js +0 -5
  166. package/dist/utils/logger.d.ts +0 -4
  167. package/dist/utils/logger.js +0 -5
  168. package/dist/utils/path.d.ts +0 -4
  169. package/dist/utils/path.js +0 -5
package/README.md CHANGED
@@ -23,13 +23,13 @@
23
23
 
24
24
  The official OSpec CLI package is `@clawplays/ospec-cli`, and the official command is `ospec`. OSpec supports spec-driven development (SDD) and document-driven development for AI coding agents and CLI workflows.
25
25
 
26
- OSpec.ai is the official project site. `OSpec`, `ospec`, `ospec.ai`, `ospec ai`, `ospecai`, and `ospec-ai` all point to the same official project and CLI.
27
-
28
26
  <p align="center">
29
27
  <a href="docs/prompt-guide.md">Prompt Guide</a> |
30
28
  <a href="docs/usage.md">Usage</a> |
31
29
  <a href="docs/project-overview.md">Overview</a> |
32
30
  <a href="docs/installation.md">Installation</a> |
31
+ <a href="docs/external-plugins.md">External Plugins</a> |
32
+ <a href="docs/plugin-release.md">Plugin Release</a> |
33
33
  <a href="https://github.com/clawplays/ospec/issues">Issues</a>
34
34
  </p>
35
35
 
@@ -91,8 +91,10 @@ CLI notes:
91
91
  - `--architecture`: short architecture description
92
92
  - `--document-language`: generated doc language, choose from `en-US`, `zh-CN`, `ja-JP`, or `ar`
93
93
  - AI-first language resolution order: explicit language request in the conversation -> current conversation language -> persisted project language in `.skillrc`
94
- - CLI language resolution order: explicit `--document-language` -> persisted project language in `.skillrc` -> existing project docs / `for-ai/*` / asset manifest -> fallback `en-US`
94
+ - CLI language resolution order: explicit `--document-language` -> persisted project language in `.skillrc` -> existing project docs / managed `for-ai/*` guidance / asset manifest -> fallback `en-US`
95
95
  - OSpec persists the chosen project document language in `.skillrc` and reuses it for `for-ai` guidance, `ospec new`, and `ospec update`
96
+ - new projects initialized by `ospec init` default to the nested layout: root `.skillrc` and `README.md`, with OSpec-managed files under `.ospec/`
97
+ - CLI commands still accept shorthand like `changes/active/<change-name>`, but the physical path in nested projects is `.ospec/changes/active/<change-name>`
96
98
  - if you pass these values, OSpec uses them directly when generating project docs
97
99
  - if you do not pass them, OSpec reuses existing docs when possible and otherwise creates placeholder docs first
98
100
 
@@ -154,7 +156,8 @@ Archive notes:
154
156
  - run your project-specific deploy, test, and QA flow first
155
157
  - use `ospec verify` to confirm the active change is ready
156
158
  - use `ospec finalize` to rebuild indexes and archive the accepted change
157
- - new projects archive under `changes/archived/YYYY-MM/YYYY-MM-DD/<change-name>`; existing flat archives are reorganized by `ospec update`
159
+ - new nested projects archive under `.ospec/changes/archived/YYYY-MM/YYYY-MM-DD/<change-name>`; CLI shorthand under `changes/archived/...` still works
160
+ - existing flat archives are reorganized by `ospec update`
158
161
 
159
162
  </details>
160
163
 
@@ -167,6 +170,11 @@ ospec update
167
170
  ```
168
171
 
169
172
  `ospec update` also migrates legacy root-level `build-index-auto.cjs` / `build-index-auto.js` tooling into `.ospec/tools/build-index-auto.cjs` and refreshes OSpec-managed hook entrypoints to use the new location.
173
+ It also repairs older OSpec projects that still have an OSpec footprint but are missing newer core runtime directories, refreshes managed skills and archive layout metadata, and syncs project assets for already-enabled plugins.
174
+ When an already-enabled plugin has a newer compatible npm package version available, `ospec update` upgrades that global plugin package automatically and prints the version transition.
175
+ It does not upgrade the CLI itself, and it does not enable plugins or migrate active / queued changes automatically.
176
+ It also does not switch a classic project layout to nested automatically.
177
+ If you want to convert an older classic project to the new layout, run `ospec layout migrate --to nested` explicitly.
170
178
 
171
179
  ## How The OSpec Workflow Works
172
180
 
@@ -181,10 +189,11 @@ ospec update
181
189
  │ 2. INIT TO CHANGE-READY │
182
190
  │ ospec init │
183
191
  │ - .skillrc │
192
+ │ - README.md │
184
193
  │ - .ospec/ │
185
- │ - changes/active + changes/archived
186
- │ - root SKILL files and for-ai guidance
187
- │ - docs/project/* baseline knowledge docs
194
+ │ - .ospec/changes/active + .ospec/changes/archived
195
+ │ - .ospec/SKILL.md + .ospec/SKILL.index.json + .ospec/for-ai│
196
+ │ - .ospec/docs/project/* baseline knowledge docs
188
197
  │ - reuse docs or fall back to placeholders │
189
198
  └─────────────────────────────────────────────────────────────────┘
190
199
 
@@ -214,7 +223,7 @@ ospec update
214
223
 
215
224
  | Concept | What It Means |
216
225
  |---------|---------------|
217
- | **Protocol Shell** | The minimum collaboration skeleton: `.skillrc`, `.ospec/`, `changes/`, root `SKILL.md`, `SKILL.index.json`, and `for-ai/` guidance. |
226
+ | **Protocol Shell** | The minimum collaboration skeleton: root `.skillrc` and `README.md`, plus managed OSpec files under `.ospec/` for change state, SKILL docs, index state, `for-ai/` guidance, and project docs. |
218
227
  | **Project Knowledge Layer** | Explicit project context such as `docs/project/*`, layered skill files, and index state that AI can read consistently. |
219
228
  | **Active Change** | A dedicated execution container for one requirement, usually with `proposal.md`, `tasks.md`, `state.json`, `verification.md`, and `review.md`. |
220
229
 
@@ -226,67 +235,40 @@ ospec update
226
235
  - **Docs maintenance**: `ospec docs generate` refreshes or repairs project knowledge docs when you need it later.
227
236
  - **Tracked requirement execution**: each change can keep proposal, tasks, state, verification, and review files aligned.
228
237
  - **Queue helpers**: `queue` and `run` support explicit multi-change execution when one active change is not enough.
229
- - **Plugin workflow gates**: built-in plugin commands support Stitch design review and Checkpoint automation.
238
+ - **Plugin workflow gates**: plugin commands support Stitch design review and Checkpoint automation through npm-installed official plugins.
230
239
  - **Skill management**: install and inspect OSpec skills for Codex and Claude Code.
231
240
  - **Standard closeout**: `finalize` verifies, rebuilds indexes, and archives the change before manual Git commit.
232
241
 
233
- ## Plugin Features
234
-
235
- OSpec includes two optional plugins that extend the document-driven workflow with UI review and flow validation.
236
-
237
- ### Stitch
242
+ ## Plugin Installation
238
243
 
239
- Use Stitch for page design review and preview collaboration, especially for landing pages, marketing pages, and UI-heavy changes.
240
-
241
- AI conversation:
244
+ OSpec supports plugins for UI review and runtime validation.
245
+ Keep the public flow simple:
242
246
 
243
247
  ```text
244
- OSpec, enable the Stitch plugin and connect using Codex/Gemini.
248
+ $ospec open Stitch for this project.
249
+ $ospec open Checkpoint for this project.
245
250
  ```
246
251
 
247
- Claude / Codex skill mode:
252
+ In AI / `$ospec` flows, requests like "open Stitch" or "open Checkpoint" should be handled as: check whether the plugin is already installed globally, install only when missing, then enable it in the current project.
248
253
 
249
- ```text
250
- $ospec enable the Stitch plugin and connect using Codex/Gemini.
251
- ```
252
-
253
- <details>
254
- <summary>Command line</summary>
254
+ Command line fallback:
255
255
 
256
256
  ```bash
257
+ ospec plugins list
258
+ ospec plugins install stitch
257
259
  ospec plugins enable stitch .
258
- ```
259
-
260
- </details>
261
-
262
- ### Checkpoint
263
-
264
- Use Checkpoint for app flow validation and automated checks, especially for submission flows, critical paths, and pre-acceptance runtime verification.
265
-
266
- AI conversation:
267
-
268
- ```text
269
- OSpec, enable the Checkpoint plugin.
270
- ```
271
-
272
- Claude / Codex skill mode:
273
-
274
- ```text
275
- $ospec enable the Checkpoint plugin.
276
- ```
277
-
278
- <details>
279
- <summary>Command line</summary>
280
-
281
- ```bash
260
+ ospec plugins install checkpoint
282
261
  ospec plugins enable checkpoint . --base-url http://127.0.0.1:3000
283
262
  ```
284
263
 
285
- Notes:
264
+ Official npm plugin packages:
286
265
 
287
- - `--base-url` points to the running app used by automated checks
266
+ - `@clawplays/ospec-plugin-stitch`
267
+ - `@clawplays/ospec-plugin-checkpoint`
288
268
 
289
- </details>
269
+ After a plugin is enabled, its detailed setup docs are synced into `.ospec/plugins/<plugin>/docs/`.
270
+
271
+ Maintainers can find plugin publishing and automation details in `docs/plugin-release.md`.
290
272
 
291
273
  ## Documentation
292
274
 
@@ -297,11 +279,8 @@ Notes:
297
279
  - [Project Overview](docs/project-overview.md)
298
280
  - [Installation](docs/installation.md)
299
281
  - [Skills Installation](docs/skills-installation.md)
300
-
301
- ### Plugin Specs
302
-
303
- - [Stitch Plugin Spec](docs/stitch-plugin-spec.zh-CN.md)
304
- - [Checkpoint Plugin Spec](docs/checkpoint-plugin-spec.zh-CN.md)
282
+ - [External Plugins](docs/external-plugins.md)
283
+ - [Plugin Release](docs/plugin-release.md)
305
284
 
306
285
  ## Repository Structure
307
286
 
package/SKILL.md CHANGED
@@ -198,6 +198,9 @@ ospec run status [path]
198
198
  ospec run step [path]
199
199
  ospec run resume [path]
200
200
  ospec run stop [path]
201
+ ospec plugins available
202
+ ospec plugins info <plugin>
203
+ ospec plugins install <plugin>
201
204
  ospec plugins status [path]
202
205
  ospec plugins approve stitch [changes/active/<change>]
203
206
  ospec plugins reject stitch [changes/active/<change>]
@@ -18,7 +18,7 @@ tags: [ai, guide, ospec]
18
18
  4. اقرأ ملفات `SKILL.md` ذات الصلة
19
19
  5. اقرأ ملفات التنفيذ الخاصة بالتغيير الحالي
20
20
  6. إذا كان Stitch مفعلاً وكان التغيير الحالي يفعّل `stitch_design_review`، فافحص `artifacts/stitch/approval.json` أولاً
21
- 7. إذا احتجت إلى تثبيت Stitch أو تبديل provider أو إصلاح doctor أو إعداد MCP أو المصادقة، فاقرأ مواصفة Stitch المحلية في المستودع أولاً. وعندما يوجد `docs/stitch-plugin-spec.zh-CN.md` فاعتبر مقاطع الإعداد فيه هي المصدر المعتمد
21
+ 7. إذا احتجت إلى تثبيت Stitch أو Checkpoint أو تبديل provider أو إصلاح doctor أو إعداد MCP أو المصادقة أو تفعيل الإضافة، فاقرأ أولاً مواصفة الإضافة المحلية في المستودع المطابقة للغة وثائق المشروع، ولا تنتقل إلى لغة أخرى إلا إذا كان الملف المطابق غير موجود
22
22
 
23
23
  ## السلوك المطلوب
24
24
 
@@ -41,7 +41,7 @@ tags: [ai, guide, ospec]
41
41
  - إذا استخدم runner مخصص `token_env` فتأكد من ضبط متغير البيئة الموافق قبل التشغيل
42
42
  - إذا لم تتضح جاهزية runner أو Gemini CLI أو Codex CLI أو stitch MCP أو المصادقة، فشغّل أولاً `ospec plugins doctor stitch <project-path>`
43
43
  - إذا أظهر `plugins doctor stitch` نتيجة غير PASS لفحوص provider المحدد، فاطلب من المستخدم تثبيت CLI المطلوب وإكمال إعداد stitch MCP / API token
44
- - عند تثبيت Stitch أو تبديل provider أو إصلاح doctor أو إعداد MCP أو المصادقة، اقرأ مواصفة Stitch المحلية أولاً. وعندما يوجد `docs/stitch-plugin-spec.zh-CN.md` فانسخ شكل إعداد Gemini / Codex الموثق فيه بدلاً من ابتكار إعداد بديل
44
+ - عند تثبيت Stitch أو تبديل provider أو إصلاح doctor أو إعداد MCP أو المصادقة، اقرأ أولاً مواصفة Stitch المحلية المطابقة للغة وثائق المشروع، ثم انسخ شكل إعداد Gemini / Codex الموثق فيها بدلاً من ابتكار إعداد بديل
45
45
  - إذا كان provider الداخلي `codex` ينجح في الاستدعاءات للقراءة فقط لكن `create_project` أو `generate_screen` أو `edit_screens` يتوقف محلياً، فتحقق أولاً من أن التشغيل يستخدم `codex exec --dangerously-bypass-approvals-and-sandbox`
46
46
  - إذا كان المشروع يبدّل `.skillrc.plugins.stitch.runner` صراحةً ومع ذلك يبقى Codex مسؤولاً عن كتابات Stitch، فيجب على runner / wrapper المخصص تمرير `--dangerously-bypass-approvals-and-sandbox` أيضاً
47
47
  - زامن `SKILL.md` بعد التغييرات البرمجية المهمة
@@ -15,7 +15,7 @@ tags: [ai, protocol, ospec]
15
15
  5. `docs/project/workflow-conventions.md`
16
16
  6. ملفات change الحالية: `proposal.md / tasks.md / state.json / verification.md`
17
17
  7. إذا وُجد `stitch_design_review` فاقرأ `artifacts/stitch/approval.json`
18
- 8. إذا كان يجب تعديل Stitch provider أو MCP أو إعدادات المصادقة، فاقرأ مواصفة Stitch المحلية أولاً. وعندما يوجد `docs/stitch-plugin-spec.zh-CN.md` فاعتبر مقاطع الإعداد فيه مرجعية
18
+ 8. إذا كنت تحتاج إلى تعديل إعدادات Stitch أو Checkpoint المتعلقة بـ provider أو MCP أو المصادقة أو التثبيت أو التفعيل، فاقرأ أولاً مواصفة الإضافة المحلية المطابقة للغة الوثائق المعتمدة للمشروع، ولا تنتقل إلى لغة أخرى إلا إذا كان الملف المطابق غير موجود
19
19
 
20
20
  ## القواعد الإلزامية
21
21
 
@@ -18,7 +18,7 @@ This document is the project-adopted AI guide copied from the OSpec mother spec.
18
18
  4. Read the relevant `SKILL.md` files
19
19
  5. Read the current change execution files
20
20
  6. If Stitch is enabled and the current change activates `stitch_design_review`, inspect `artifacts/stitch/approval.json` first
21
- 7. If you need to handle Stitch installation, provider switching, doctor remediation, MCP setup, or auth setup, read the repo-local Stitch spec first; when `docs/stitch-plugin-spec.zh-CN.md` exists, treat its config snippets as the source of truth
21
+ 7. If you need to handle Stitch or Checkpoint installation, provider switching, doctor remediation, MCP setup, auth setup, or plugin enablement, read the repo-local localized plugin docs under `.ospec/plugins/<plugin>/docs/` first; if they are missing, install or enable the plugin to sync its docs before changing config
22
22
 
23
23
  ## Required Behavior
24
24
 
@@ -41,7 +41,7 @@ This document is the project-adopted AI guide copied from the OSpec mother spec.
41
41
  - If the project uses a custom runner and `token_env` is configured, confirm the matching environment variable is set before running
42
42
  - If the runner, Gemini CLI, Codex CLI, stitch MCP, or auth readiness is unclear, run `ospec plugins doctor stitch <project-path>` first
43
43
  - If `plugins doctor stitch` reports non-PASS for the selected provider checks, prompt the user to install the required CLI and complete the stitch MCP / API token setup in the matching user config
44
- - For Stitch installation, provider switching, doctor remediation, MCP setup, or auth setup, read the repo-local Stitch spec first; when `docs/stitch-plugin-spec.zh-CN.md` exists, copy the documented Gemini / Codex config shape instead of inventing a `command` / `args` / `env` or stdio-proxy workaround just to satisfy doctor
44
+ - For Stitch installation, provider switching, doctor remediation, MCP setup, or auth setup, read `.ospec/plugins/stitch/docs/` first and follow the plugin's documented config shape instead of inventing a `command` / `args` / `env` or stdio-proxy workaround just to satisfy doctor
45
45
  - If the built-in `codex` provider succeeds on read-only calls but `create_project`, `generate_screen`, or `edit_screens` stalls locally, first verify the run actually uses `codex exec --dangerously-bypass-approvals-and-sandbox`
46
46
  - If the project explicitly overrides `.skillrc.plugins.stitch.runner` and Codex still performs Stitch writes, the custom runner / wrapper must also pass `--dangerously-bypass-approvals-and-sandbox`
47
47
  - Sync `SKILL.md` after meaningful code changes
@@ -54,37 +54,10 @@ This document is the project-adopted AI guide copied from the OSpec mother spec.
54
54
  - Workflow conventions: `docs/project/workflow-conventions.md`
55
55
  - Development guide: `docs/project/development-guide.md`
56
56
 
57
- ## Stitch Provider Baseline
57
+ ## Stitch Provider Docs
58
58
 
59
- - When `docs/stitch-plugin-spec.zh-CN.md` exists in the repo, use its original config snippets first.
60
- - When the repo does not contain that spec and the built-in Stitch provider must be enabled, use these baselines.
61
- - `gemini`: edit `%USERPROFILE%/.gemini/settings.json` and use `mcpServers.stitch.httpUrl` plus `headers.X-Goog-Api-Key`.
62
-
63
- ```json
64
- {
65
- "mcpServers": {
66
- "stitch": {
67
- "httpUrl": "https://stitch.googleapis.com/mcp",
68
- "headers": {
69
- "X-Goog-Api-Key": "your-stitch-api-key"
70
- }
71
- }
72
- }
73
- }
74
- ```
75
-
76
- - `codex`: edit `%USERPROFILE%/.codex/config.toml` and use HTTP transport, the fixed Stitch MCP URL, and the `X-Goog-Api-Key` header.
77
- - The built-in `codex` adapter should launch Stitch write operations through `codex exec --dangerously-bypass-approvals-and-sandbox`; if a custom runner replaces it, that runner must provide the same write-bypass behavior.
78
-
79
- ```toml
80
- [mcp_servers.stitch]
81
- type = "http"
82
- url = "https://stitch.googleapis.com/mcp"
83
- headers = { X-Goog-Api-Key = "your-stitch-api-key" }
84
-
85
- [mcp_servers.stitch.http_headers]
86
- X-Goog-Api-Key = "your-stitch-api-key"
87
- ```
59
+ - Provider, MCP, auth, and runner details live in `.ospec/plugins/stitch/docs/` after the Stitch plugin is installed and enabled for the project.
60
+ - If those docs are missing, install or enable Stitch first so the plugin can sync its localized docs into the repository before changing config.
88
61
 
89
62
  ## Stitch Canonical Layout
90
63
 
@@ -15,7 +15,7 @@ tags: [ai, protocol, ospec]
15
15
  5. `docs/project/workflow-conventions.md`
16
16
  6. The current change files: `proposal.md / tasks.md / state.json / verification.md`
17
17
  7. If `stitch_design_review` exists, read `artifacts/stitch/approval.json`
18
- 8. If Stitch provider, MCP, or auth config must be changed, read the repo-local Stitch spec first; when `docs/stitch-plugin-spec.zh-CN.md` exists, treat its config snippets as authoritative
18
+ 8. If Stitch or Checkpoint provider, MCP, auth, install, or enable config must be changed, read the repo-local localized plugin docs under `.ospec/plugins/<plugin>/docs/` first; if they are missing, install or enable the plugin to sync its docs before changing config
19
19
 
20
20
  ## Mandatory Rules
21
21
 
@@ -36,7 +36,7 @@ tags: [ai, protocol, ospec]
36
36
  - Before running Stitch, assume the built-in `stitch` plugin uses the configured provider by default; only treat `.skillrc.plugins.stitch.runner` as authoritative when the project explicitly overrides it
37
37
  - If the project uses a custom runner and `token_env` is configured, confirm the matching environment variable is set
38
38
  - If the local Stitch bridge, Gemini CLI, Codex CLI, stitch MCP, or auth readiness is unclear, run `ospec plugins doctor stitch <project-path>` first
39
- - If `plugins doctor stitch` reveals provider, MCP, or auth issues, return to the repo-local Stitch spec first; when `docs/stitch-plugin-spec.zh-CN.md` exists, do not invent an alternate `command` / `args` / `env` or stdio-proxy config outside that spec
39
+ - If `plugins doctor stitch` reveals provider, MCP, or auth issues, return to `.ospec/plugins/stitch/docs/` first; do not invent an alternate `command` / `args` / `env` or stdio-proxy config outside the plugin docs
40
40
  - If the built-in `codex` provider can complete read-only calls but `create_project`, `generate_screen`, or `edit_screens` stalls locally, first verify the run actually uses `codex exec --dangerously-bypass-approvals-and-sandbox`
41
41
  - If the project explicitly overrides `.skillrc.plugins.stitch.runner` and still uses Codex for Stitch writes, the custom runner / wrapper must also pass `--dangerously-bypass-approvals-and-sandbox`
42
42
  - If `stitch_design_review` is active and `approval.json.status != approved`, do not treat the change as ready for continued implementation, completion, or archive
@@ -47,12 +47,10 @@ tags: [ai, protocol, ospec]
47
47
 
48
48
  If the project rules differ from the mother spec, the project-adopted rules take precedence.
49
49
 
50
- ## Stitch Provider Baseline
50
+ ## Stitch Provider Docs
51
51
 
52
- - If the project contains `docs/stitch-plugin-spec.zh-CN.md`, provider / MCP / auth config must follow that spec first.
53
- - If the project does not contain that spec and the built-in `gemini` provider is used, the baseline config is `%USERPROFILE%/.gemini/settings.json` with `mcpServers.stitch.httpUrl = "https://stitch.googleapis.com/mcp"` and `headers.X-Goog-Api-Key`.
54
- - If the project does not contain that spec and the built-in `codex` provider is used, the baseline config is `%USERPROFILE%/.codex/config.toml` with `[mcp_servers.stitch]`, `type = "http"`, `url = "https://stitch.googleapis.com/mcp"`, and `X-Goog-Api-Key` in `headers` or `[mcp_servers.stitch.http_headers]`.
55
- - The built-in `codex` provider should launch Stitch write operations with `--dangerously-bypass-approvals-and-sandbox`; if a custom runner replaces it, that runner must carry the same write-bypass behavior explicitly.
52
+ - Provider / MCP / auth config must follow the localized Stitch plugin docs under `.ospec/plugins/stitch/docs/`.
53
+ - If those docs are missing, install or enable Stitch first so the plugin can sync its localized docs into the repository before changing config.
56
54
 
57
55
  ## Stitch Theme Variant Prompt Contract
58
56
 
@@ -18,7 +18,7 @@ tags: [ai, guide, ospec]
18
18
  4. 関連する `SKILL.md` を読む
19
19
  5. 現在の change 実行ファイルを読む
20
20
  6. Stitch が有効で、現在の change が `stitch_design_review` を有効化している場合は、先に `artifacts/stitch/approval.json` を確認する
21
- 7. Stitch のインストール、provider 切り替え、doctor 修復、MCP 設定、認証設定が必要な場合は、先にリポジトリ内の Stitch 仕様を読む。`docs/stitch-plugin-spec.zh-CN.md` が存在する場合、その設定断片を正とみなす
21
+ 7. Stitch / Checkpoint のインストール、provider 切り替え、doctor 修復、MCP 設定、認証設定、またはプラグイン有効化が必要な場合は、先にプロジェクト文書言語に一致するリポジトリ内のローカライズ済みプラグイン仕様を読む。一致する言語ファイルがない場合のみ他言語版へフォールバックする
22
22
 
23
23
  ## 必須動作
24
24
 
@@ -41,7 +41,7 @@ tags: [ai, guide, ospec]
41
41
  - custom runner で `token_env` を使う場合は、対応する環境変数が設定済みかを確認する
42
42
  - runner、Gemini CLI、Codex CLI、stitch MCP、認証準備が不明な場合は、まず `ospec plugins doctor stitch <project-path>` を実行する
43
43
  - `plugins doctor stitch` が選択 provider のチェックで PASS 以外を返したら、必要な CLI の導入と stitch MCP / API token 設定をユーザーに依頼する
44
- - Stitch のインストール、provider 切り替え、doctor 修復、MCP 設定、認証設定では、まずリポジトリ内の Stitch 仕様を読む。`docs/stitch-plugin-spec.zh-CN.md` が存在する場合は、Gemini / Codex の設定形をそのまま使い、回避目的の別設定を即興で作らない
44
+ - Stitch のインストール、provider 切り替え、doctor 修復、MCP 設定、認証設定では、まずプロジェクト文書言語に一致するリポジトリ内のローカライズ済み Stitch 仕様を読む。Gemini / Codex の設定形をそのまま使い、回避目的の別設定を即興で作らない
45
45
  - 内蔵 `codex` provider が read-only 呼び出しでは成功するのに `create_project`、`generate_screen`、`edit_screens` が止まる場合は、`codex exec --dangerously-bypass-approvals-and-sandbox` が実際に使われているか確認する
46
46
  - プロジェクトが `.skillrc.plugins.stitch.runner` を明示的に上書きし、それでも Codex が Stitch 書き込みを担当する場合は、その custom runner / wrapper でも `--dangerously-bypass-approvals-and-sandbox` を渡す
47
47
  - 重要なコード変更後は `SKILL.md` を同期する
@@ -15,7 +15,7 @@ tags: [ai, protocol, ospec]
15
15
  5. `docs/project/workflow-conventions.md`
16
16
  6. 現在の change ファイル: `proposal.md / tasks.md / state.json / verification.md`
17
17
  7. `stitch_design_review` がある場合は `artifacts/stitch/approval.json`
18
- 8. Stitch provider、MCP、認証設定を変更する必要がある場合は、先にリポジトリ内の Stitch 仕様を読む。`docs/stitch-plugin-spec.zh-CN.md` が存在する場合、その設定断片を正とみなす
18
+ 8. Stitch / Checkpoint の provider、MCP、認証、インストール、または有効化設定を変更する必要がある場合は、先にプロジェクト文書言語に一致するリポジトリ内のローカライズ済みプラグイン仕様を読む。一致する言語ファイルがない場合のみ他言語版へフォールバックする
19
19
 
20
20
  ## 必須ルール
21
21
 
@@ -36,7 +36,7 @@ tags: [ai, protocol, ospec]
36
36
  - Stitch 実行前は、既定では設定済み provider が使われるとみなす。`.skillrc.plugins.stitch.runner` が明示的に上書きされている場合のみ custom runner を使う
37
37
  - custom runner で `token_env` を使う場合は、対応する環境変数が設定済みか確認する
38
38
  - ローカル Stitch bridge、Gemini CLI、Codex CLI、stitch MCP、認証準備が不明なら、まず `ospec plugins doctor stitch <project-path>` を実行する
39
- - `plugins doctor stitch` が provider、MCP、認証の問題を示した場合は、まずリポジトリ内 Stitch 仕様に戻る。`docs/stitch-plugin-spec.zh-CN.md` がある場合、その仕様外の代替設定を作らない
39
+ - `plugins doctor stitch` が provider、MCP、認証の問題を示した場合は、まずプロジェクト文書言語に一致するリポジトリ内のローカライズ済み Stitch 仕様に戻る。その仕様外の代替設定を作らない
40
40
  - 内蔵 `codex` provider が read-only 呼び出しは完了できるのに `create_project`、`generate_screen`、`edit_screens` が止まる場合は、`codex exec --dangerously-bypass-approvals-and-sandbox` が使われているか確認する
41
41
  - プロジェクトが `.skillrc.plugins.stitch.runner` を明示的に上書きしつつ Codex で Stitch 書き込みを行う場合は、custom runner / wrapper でも `--dangerously-bypass-approvals-and-sandbox` を渡す
42
42
  - `stitch_design_review` が有効で `approval.json.status != approved` の間は、その change を継続実装、完了、archive 可能と扱わない
@@ -18,7 +18,7 @@ tags: [ai, guide, ospec]
18
18
  4. 读取相关 `SKILL.md`
19
19
  5. 读取当前 change 的执行文件
20
20
  6. 如果项目启用了 Stitch,且当前 change 激活了 `stitch_design_review`,优先检查 `artifacts/stitch/approval.json`
21
- 7. 如果要处理 Stitch 的安装、provider 切换、doctor 修复、MCP 或认证配置,先读取仓库内 Stitch 规范;若存在 `docs/stitch-plugin-spec.zh-CN.md`,必须以该文档中的配置片段为准
21
+ 7. 如果要处理 Stitch / Checkpoint 的安装、provider 切换、doctor 修复、MCP、认证配置或插件启用,先读取与项目文档语言一致的仓库内本地化插件规范;只有该语言文件缺失时,才回退到其他语言版本
22
22
 
23
23
  ## 必须遵守
24
24
 
@@ -39,7 +39,7 @@ tags: [ai, guide, ospec]
39
39
  - 如果项目使用自定义 runner 且配置了 `token_env`,运行前必须确认对应环境变量已设置
40
40
  - runner、Gemini CLI、Codex CLI、stitch MCP 或认证状态不确定时,先执行 `ospec plugins doctor stitch <project-path>` 自检
41
41
  - 若 `plugins doctor stitch` 提示所选 provider 的关键检查不是 PASS,先提示用户安装对应 CLI 并补全相应用户配置中的 stitch MCP / API token 设置
42
- - 涉及 Stitch 安装、provider 切换、doctor 修复、MCP 或认证配置时,必须先读取仓库内 Stitch 规范;若存在 `docs/stitch-plugin-spec.zh-CN.md`,直接采用其中的 Gemini / Codex 配置片段,不得为了让 `doctor` 通过而自行拼接 `command` / `args` / `env` 或 stdio proxy 配置
42
+ - 涉及 Stitch 安装、provider 切换、doctor 修复、MCP 或认证配置时,必须先读取与项目文档语言一致的仓库内本地化 Stitch 规范,直接采用其中的 Gemini / Codex 配置片段,不得为了让 `doctor` 通过而自行拼接 `command` / `args` / `env` 或 stdio proxy 配置
43
43
  - 如果内建 `codex` provider 下只读调用正常,但 `create_project`、`generate_screen`、`edit_screens` 这类写操作卡在本地,优先检查是否真正走了 `codex exec --dangerously-bypass-approvals-and-sandbox`
44
44
  - 如果项目显式覆写 `.skillrc.plugins.stitch.runner` 且仍由 Codex 负责 Stitch 写操作,自定义 runner / wrapper 也必须显式带上 `--dangerously-bypass-approvals-and-sandbox`
45
45
  - 修改代码后同步更新 `SKILL.md`
@@ -60,7 +60,7 @@ tags: [ai, guide, ospec]
60
60
 
61
61
  ## Stitch Provider Baseline
62
62
 
63
- - 如果仓库里存在 `docs/stitch-plugin-spec.zh-CN.md`,优先使用文档中的原始配置片段。
63
+ - 如果仓库里存在与项目文档语言一致的本地化 Stitch 规范,优先使用文档中的原始配置片段。
64
64
  - 如果仓库里没有这份规范,但需要启用内建 Stitch provider,默认基线如下。
65
65
  - `gemini`:修改 `%USERPROFILE%/.gemini/settings.json`,使用 `mcpServers.stitch.httpUrl` 和 `headers.X-Goog-Api-Key`。
66
66
 
@@ -15,7 +15,7 @@ tags: [ai, protocol, ospec]
15
15
  5. `docs/project/workflow-conventions.md`
16
16
  6. 当前 change 的 `proposal.md / tasks.md / state.json / verification.md`
17
17
  7. 如存在 `stitch_design_review`,读取 `artifacts/stitch/approval.json`
18
- 8. 如要调整 Stitch provider、MCP 或认证配置,先读取仓库内 Stitch 规范;若存在 `docs/stitch-plugin-spec.zh-CN.md`,必须以该文档中的配置片段为准
18
+ 8. 如要处理 Stitch / Checkpoint 的 provider、MCP、认证、安装或启用配置,先读取与项目文档语言一致的仓库内本地化插件规范;只有该语言文件缺失时,才回退到其他语言版本
19
19
 
20
20
  ## 强制规则
21
21
 
@@ -34,7 +34,7 @@ tags: [ai, protocol, ospec]
34
34
  - 运行 Stitch 前,优先视为走内建 `stitch` 插件的已配置 provider;只有项目显式覆写 `.skillrc.plugins.stitch.runner` 时才按自定义 runner 处理
35
35
  - 如项目使用自定义 runner 且配置了 `token_env`,必须确认对应环境变量已设置
36
36
  - 若本地 Stitch bridge、Gemini CLI、Codex CLI、stitch MCP 或认证状态不明确,先执行 `ospec plugins doctor stitch <project-path>`
37
- - 若 `plugins doctor stitch` 暴露 provider / MCP / auth 问题,先回到仓库内 Stitch 规范修正配置;若存在 `docs/stitch-plugin-spec.zh-CN.md`,不得脱离该文档另造一套 `command` / `args` / `env` 或 stdio proxy 配置
37
+ - 若 `plugins doctor stitch` 暴露 provider / MCP / auth 问题,先回到与项目文档语言一致的仓库内本地化 Stitch 规范修正配置;不得脱离该文档另造一套 `command` / `args` / `env` 或 stdio proxy 配置
38
38
  - 如果内建 `codex` provider 下只读调用正常,但 `create_project`、`generate_screen`、`edit_screens` 等写操作在本地卡住,优先检查是否真正走了 `codex exec --dangerously-bypass-approvals-and-sandbox`
39
39
  - 如果项目显式覆写 `.skillrc.plugins.stitch.runner` 且仍使用 Codex 发起 Stitch 写操作,自定义 runner / wrapper 也必须显式带上 `--dangerously-bypass-approvals-and-sandbox`
40
40
  - 如果 `stitch_design_review` 已激活且 `approval.json.status != approved`,不得把 change 视为可继续实现、可完成或可归档
@@ -53,7 +53,7 @@ tags: [ai, protocol, ospec]
53
53
 
54
54
  ## Stitch Provider Baseline
55
55
 
56
- - 如果项目内存在 `docs/stitch-plugin-spec.zh-CN.md`,provider / MCP / auth 配置优先以该文档为准。
56
+ - 如果项目内存在与项目文档语言一致的本地化 Stitch 规范,provider / MCP / auth 配置优先以该文档为准。
57
57
  - 如果项目内没有该文档,且走内建 `gemini` provider,默认配置基线是 `%USERPROFILE%/.gemini/settings.json` 中的 `mcpServers.stitch.httpUrl = "https://stitch.googleapis.com/mcp"`,并在 `headers` 中设置 `X-Goog-Api-Key`。
58
58
  - 如果项目内没有该文档,且走内建 `codex` provider,默认配置基线是 `%USERPROFILE%/.codex/config.toml` 中的 `[mcp_servers.stitch]`,要求 `type = "http"`、`url = "https://stitch.googleapis.com/mcp"`,并在 `headers` 或 `[mcp_servers.stitch.http_headers]` 中设置 `X-Goog-Api-Key`。
59
59
  - 内建 `codex` provider 的 Stitch 写操作默认应带 `--dangerously-bypass-approvals-and-sandbox`;若改用自定义 runner,则该放行参数也必须由自定义 runner 显式承担。
@@ -26,7 +26,9 @@ This skill is the single entry for the full change lifecycle inside an initializ
26
26
  2. `SKILL.index.json`
27
27
  3. `for-ai/ai-guide.md`
28
28
  4. `for-ai/execution-protocol.md`
29
- 5. If Stitch installation, provider switching, doctor remediation, MCP setup, or auth setup is involved, read the repo-local Stitch plugin spec first. When `docs/stitch-plugin-spec.zh-CN.md` exists, treat it as the source of truth for the config shape.
29
+ 5. If Stitch or Checkpoint installation, provider switching, doctor remediation, MCP setup, auth setup, or plugin enablement is involved, read the localized plugin docs under `.ospec/plugins/<plugin>/docs/` first. Before any install step, check `ospec plugins info <plugin>` or `ospec plugins installed`. If the plugin is already installed globally, reuse it and enable it in the current project instead of reinstalling it.
30
+ 6. Treat `ospec update [path]` as project-scoped. It repairs the current project and only upgrades plugins that are enabled in that project.
31
+ 7. Do not run `ospec plugins update --all` unless the user explicitly asks to update every installed plugin on the machine.
30
32
  6. If the user explicitly asks for queue behavior, inspect `changes/queued/` before creating new queue items.
31
33
  7. `changes/active/<change>/proposal.md`
32
34
  8. `changes/active/<change>/tasks.md`
@@ -57,10 +59,7 @@ When `.skillrc.plugins.stitch.enabled = true` and `.skillrc.plugins.stitch.capab
57
59
  - treat the built-in `stitch` plugin with the configured provider adapter as the default path unless `.skillrc.plugins.stitch.runner` is explicitly overridden
58
60
  - if a custom runner is configured and `token_env` is set but missing, stop and request configuration first
59
61
  - if runner readiness, provider CLI, stitch MCP, or auth readiness is unclear, use `ospec plugins doctor stitch <project-path>` before `ospec plugins run stitch <change-path>`
60
- - if Stitch installation, provider switching, doctor remediation, MCP setup, or auth setup is involved, read the repo-local Stitch plugin spec first; when `docs/stitch-plugin-spec.zh-CN.md` exists, use its documented Gemini / Codex config snippets instead of inventing `command` / `args` / `env` or stdio-proxy settings
61
- - if the repo-local Stitch spec is missing, use these built-in baselines instead of guessing:
62
- - `gemini`: `%USERPROFILE%/.gemini/settings.json` -> `mcpServers.stitch.httpUrl = "https://stitch.googleapis.com/mcp"` and `headers.X-Goog-Api-Key`
63
- - `codex`: `%USERPROFILE%/.codex/config.toml` -> `[mcp_servers.stitch]`, `type = "http"`, `url = "https://stitch.googleapis.com/mcp"`, and `X-Goog-Api-Key` in `headers` or `[mcp_servers.stitch.http_headers]`
62
+ - if Stitch installation, provider switching, doctor remediation, MCP setup, or auth setup is involved, read `.ospec/plugins/stitch/docs/` first and follow the plugin's documented config snippets instead of inventing `command` / `args` / `env` or stdio-proxy settings
64
63
  - use `ospec plugins approve stitch <change-path>` or `ospec plugins reject stitch <change-path>` to record the review result
65
64
 
66
65
  ## Required Logic
@@ -27,7 +27,9 @@ This skill is the single entry for the full change lifecycle inside an initializ
27
27
  2. `SKILL.index.json`
28
28
  3. `for-ai/ai-guide.md`
29
29
  4. `for-ai/execution-protocol.md`
30
- 5. If Stitch installation, provider switching, doctor remediation, MCP setup, or auth setup is involved, read the repo-local Stitch plugin spec first. When `docs/stitch-plugin-spec.zh-CN.md` exists, treat it as the source of truth for the config shape.
30
+ 5. If Stitch or Checkpoint installation, provider switching, doctor remediation, MCP setup, auth setup, or plugin enablement is involved, read the localized plugin docs under `.ospec/plugins/<plugin>/docs/` first. Before any install step, check `ospec plugins info <plugin>` or `ospec plugins installed`. If the plugin is already installed globally, reuse it and enable it in the current project instead of reinstalling it.
31
+ 6. Treat `ospec update [path]` as project-scoped. It repairs the current project and only upgrades plugins that are enabled in that project.
32
+ 7. Do not run `ospec plugins update --all` unless the user explicitly asks to update every installed plugin on the machine.
31
33
  6. If the user explicitly asks for queue behavior, inspect `changes/queued/` before creating new queue items.
32
34
  7. `changes/active/<change>/proposal.md`
33
35
  8. `changes/active/<change>/tasks.md`
@@ -58,10 +60,7 @@ When `.skillrc.plugins.stitch.enabled = true` and `.skillrc.plugins.stitch.capab
58
60
  - treat the built-in `stitch` plugin with the configured provider adapter as the default path unless `.skillrc.plugins.stitch.runner` is explicitly overridden
59
61
  - if a custom runner is configured and `token_env` is set but missing, stop and request configuration first
60
62
  - if runner readiness, provider CLI, stitch MCP, or auth readiness is unclear, use `ospec plugins doctor stitch <project-path>` before `ospec plugins run stitch <change-path>`
61
- - if Stitch installation, provider switching, doctor remediation, MCP setup, or auth setup is involved, read the repo-local Stitch plugin spec first; when `docs/stitch-plugin-spec.zh-CN.md` exists, use its documented Gemini / Codex config snippets instead of inventing `command` / `args` / `env` or stdio-proxy settings
62
- - if the repo-local Stitch spec is missing, use these built-in baselines instead of guessing:
63
- - `gemini`: `%USERPROFILE%/.gemini/settings.json` -> `mcpServers.stitch.httpUrl = "https://stitch.googleapis.com/mcp"` and `headers.X-Goog-Api-Key`
64
- - `codex`: `%USERPROFILE%/.codex/config.toml` -> `[mcp_servers.stitch]`, `type = "http"`, `url = "https://stitch.googleapis.com/mcp"`, and `X-Goog-Api-Key` in `headers` or `[mcp_servers.stitch.http_headers]`
63
+ - if Stitch installation, provider switching, doctor remediation, MCP setup, or auth setup is involved, read `.ospec/plugins/stitch/docs/` first and follow the plugin's documented config snippets instead of inventing `command` / `args` / `env` or stdio-proxy settings
65
64
  - use `ospec plugins approve stitch <change-path>` or `ospec plugins reject stitch <change-path>` to record the review result
66
65
 
67
66
  ## Required Logic
@@ -4,4 +4,4 @@ interface:
4
4
 
5
5
  short_description: "Create or advance a change"
6
6
 
7
- default_prompt: "Use $ospec-change to create or advance a OSpec change. Read .skillrc, SKILL.index.json, and the current change files first. Default to one active change and do not enter queue mode unless the user explicitly asks to split work into multiple changes, create a queue, or execute a queue. When queue behavior is explicitly requested, derive an ordered kebab-case list of change names, use ospec queue add to create queued changes, and use ospec run manual-safe only when the user explicitly asks to run the queue. Keep protocol execution inside changes/active/<change> and do not confuse bootstrap with change creation. If Stitch is enabled and stitch_design_review is active, inspect artifacts/stitch/approval.json. For Stitch installation, provider switching, doctor remediation, MCP setup, or auth setup, read the repo-local Stitch plugin spec first and use its documented config snippet instead of inventing a replacement. If that spec is missing, use these built-in baselines: Gemini uses %USERPROFILE%/.gemini/settings.json with mcpServers.stitch.httpUrl and headers.X-Goog-Api-Key; Codex uses %USERPROFILE%/.codex/config.toml with [mcp_servers.stitch], type=\"http\", url=\"https://stitch.googleapis.com/mcp\", and X-Goog-Api-Key in headers or [mcp_servers.stitch.http_headers]. If preview_url or submitted_at is empty, run ospec plugins run stitch <change-path> before asking for review."
7
+ default_prompt: "Use $ospec-change to create or advance a OSpec change. Read .skillrc, SKILL.index.json, and the current change files first. Default to one active change and do not enter queue mode unless the user explicitly asks to split work into multiple changes, create a queue, or execute a queue. When queue behavior is explicitly requested, derive an ordered kebab-case list of change names, use ospec queue add to create queued changes, and use ospec run manual-safe only when the user explicitly asks to run the queue. Keep protocol execution inside changes/active/<change> and do not confuse bootstrap with change creation. If Stitch is enabled and stitch_design_review is active, inspect artifacts/stitch/approval.json. Before any plugin install step, check `ospec plugins info <plugin>` or `ospec plugins installed`. If the plugin is already installed globally, reuse it and only enable it in the current project. Only run `ospec plugins install <plugin>` when the plugin is not installed yet or the user explicitly asks to reinstall or upgrade it. Treat `ospec update [path]` as project-scoped: it repairs the current project and only upgrades plugins that are enabled in that project. Do not run `ospec plugins update --all` unless the user explicitly asks to update every installed plugin on the machine. If plugin installation, provider switching, doctor remediation, MCP setup, auth setup, or plugin enablement is involved, read `.ospec/plugins/<plugin>/docs/` first; if those docs are missing, install or enable the plugin to sync them before changing config. If preview_url or submitted_at is empty, run ospec plugins run stitch <change-path> before asking for review."
@@ -16,4 +16,4 @@ interface:
16
16
 
17
17
  short_description: "Create or advance a change"
18
18
 
19
- default_prompt: "Use $ospec-change to create or advance a OSpec change. Read .skillrc, SKILL.index.json, and the current change files first. Default to one active change and do not enter queue mode unless the user explicitly asks to split work into multiple changes, create a queue, or execute a queue. When queue behavior is explicitly requested, derive an ordered kebab-case list of change names, use ospec queue add to create queued changes, and use ospec run manual-safe only when the user explicitly asks to run the queue. Keep protocol execution inside changes/active/<change> and do not confuse bootstrap with change creation. If Stitch is enabled and stitch_design_review is active, inspect artifacts/stitch/approval.json. For Stitch installation, provider switching, doctor remediation, MCP setup, or auth setup, read the repo-local Stitch plugin spec first and use its documented config snippet instead of inventing a replacement. If that spec is missing, use these built-in baselines: Gemini uses %USERPROFILE%/.gemini/settings.json with mcpServers.stitch.httpUrl and headers.X-Goog-Api-Key; Codex uses %USERPROFILE%/.codex/config.toml with [mcp_servers.stitch], type=\"http\", url=\"https://stitch.googleapis.com/mcp\", and X-Goog-Api-Key in headers or [mcp_servers.stitch.http_headers]. Reuse .skillrc.plugins.stitch.project.project_id when it already exists; if it is empty, treat the first successful Stitch run as the canonical project. If preview_url or submitted_at is empty, run ospec plugins run stitch <change-path> before asking for review."
19
+ default_prompt: "Use $ospec-change to create or advance a OSpec change. Read .skillrc, SKILL.index.json, and the current change files first. Default to one active change and do not enter queue mode unless the user explicitly asks to split work into multiple changes, create a queue, or execute a queue. When queue behavior is explicitly requested, derive an ordered kebab-case list of change names, use ospec queue add to create queued changes, and use ospec run manual-safe only when the user explicitly asks to run the queue. Keep protocol execution inside changes/active/<change> and do not confuse bootstrap with change creation. If Stitch is enabled and stitch_design_review is active, inspect artifacts/stitch/approval.json. Before any plugin install step, check `ospec plugins info <plugin>` or `ospec plugins installed`. If the plugin is already installed globally, reuse it and only enable it in the current project. Only run `ospec plugins install <plugin>` when the plugin is not installed yet or the user explicitly asks to reinstall or upgrade it. Treat `ospec update [path]` as project-scoped: it repairs the current project and only upgrades plugins that are enabled in that project. Do not run `ospec plugins update --all` unless the user explicitly asks to update every installed plugin on the machine. If plugin installation, provider switching, doctor remediation, MCP setup, auth setup, or plugin enablement is involved, read `.ospec/plugins/<plugin>/docs/` first; if those docs are missing, install or enable the plugin to sync them before changing config. Reuse .skillrc.plugins.stitch.project.project_id when it already exists; if it is empty, treat the first successful Stitch run as the canonical project. If preview_url or submitted_at is empty, run ospec plugins run stitch <change-path> before asking for review."
@@ -0,0 +1,47 @@
1
+ {
2
+ "version": 1,
3
+ "plugins": [
4
+ {
5
+ "id": "checkpoint",
6
+ "packageName": "@clawplays/ospec-plugin-checkpoint",
7
+ "installRange": ">=1.0.0 <2.0.0",
8
+ "displayName": "Checkpoint",
9
+ "official": true,
10
+ "description": "Runtime review and flow validation for OSpec projects.",
11
+ "kinds": [
12
+ "runtime",
13
+ "skill",
14
+ "knowledge"
15
+ ],
16
+ "docs": {
17
+ "locales": {
18
+ "en-US": "plugins/checkpoint/docs/plugin.md",
19
+ "zh-CN": "plugins/checkpoint/docs/plugin.zh-CN.md",
20
+ "ja-JP": "plugins/checkpoint/docs/plugin.ja.md",
21
+ "ar": "plugins/checkpoint/docs/plugin.ar.md"
22
+ }
23
+ }
24
+ },
25
+ {
26
+ "id": "stitch",
27
+ "packageName": "@clawplays/ospec-plugin-stitch",
28
+ "installRange": ">=1.0.0 <2.0.0",
29
+ "displayName": "Stitch",
30
+ "official": true,
31
+ "description": "Page design review and preview collaboration for OSpec projects.",
32
+ "kinds": [
33
+ "runtime",
34
+ "skill",
35
+ "knowledge"
36
+ ],
37
+ "docs": {
38
+ "locales": {
39
+ "en-US": "plugins/stitch/docs/plugin.md",
40
+ "zh-CN": "plugins/stitch/docs/plugin.zh-CN.md",
41
+ "ja-JP": "plugins/stitch/docs/plugin.ja.md",
42
+ "ar": "plugins/stitch/docs/plugin.ar.md"
43
+ }
44
+ }
45
+ }
46
+ ]
47
+ }
@@ -38,3 +38,9 @@ tags: [conventions, workflow, change, ospec]
38
38
  - يتم التحكم في تفعيل optional steps عبر `.skillrc.workflow`
39
39
  - يجب أن تبقى proposal flags متوافقة مع إعدادات workflow
40
40
  - يجب أن تظهر optional steps المفعلة في `tasks.md` و`verification.md`
41
+
42
+ ## Plugin Gates
43
+
44
+ - يتم التحكم في قدرات الإضافات عبر `.skillrc.plugins`
45
+ - عند التعامل مع تثبيت Stitch أو Checkpoint أو تبديل provider أو إصلاح doctor أو إعداد MCP أو المصادقة أو تفعيل الإضافة، يجب قراءة مواصفة الإضافة المحلية المطابقة للغة الوثائق المعتمدة للمشروع أولاً
46
+ - لا يتم الرجوع إلى ملف مواصفة بلغة أخرى إلا إذا كان الملف المحلي لتلك اللغة غير موجود
@@ -50,8 +50,7 @@ This document fixes the OSpec execution flow inside the project so requirements
50
50
  - `ospec plugins run stitch <change-path>` uses the configured Stitch provider adapter by default; if the project explicitly overrides `.skillrc.plugins.stitch.runner`, use the custom Stitch bridge / wrapper instead
51
51
  - For custom runners, use `token_env` when extra tokens are required; for the built-in Gemini adapter, auth is typically configured under `%USERPROFILE%/.gemini/settings.json` in `mcpServers.stitch`
52
52
  - Use `ospec plugins doctor stitch <project-path>` to validate the runner, provider CLI, stitch MCP, and auth-hint readiness
53
- - For Stitch installation, provider switching, doctor remediation, MCP setup, or auth setup, read the repo-local Stitch spec first; when `docs/stitch-plugin-spec.zh-CN.md` exists, use its config snippets instead of inventing an alternate setup just to satisfy the checks
54
- - If the repo does not contain a Stitch spec, use the built-in baselines instead: `gemini` edits `%USERPROFILE%/.gemini/settings.json` with `mcpServers.stitch.httpUrl` and `headers.X-Goog-Api-Key`; `codex` edits `%USERPROFILE%/.codex/config.toml` with `[mcp_servers.stitch]`, `type = "http"`, `url = "https://stitch.googleapis.com/mcp"`, and `X-Goog-Api-Key`
53
+ - For Stitch or Checkpoint installation, provider switching, doctor remediation, MCP setup, auth setup, or plugin enablement, read the localized plugin docs under `.ospec/plugins/<plugin>/docs/` first; if they are missing, install or enable the plugin to sync its docs before changing config
55
54
  - If the built-in `codex` provider succeeds on read-only calls but local write operations never reach `mcp_tool_call`, first verify the run actually uses `codex exec --dangerously-bypass-approvals-and-sandbox`
56
55
  - If the project overrides a custom Codex runner / wrapper, that custom execution path must also pass `--dangerously-bypass-approvals-and-sandbox`
57
56
  - When `approval.json.status` is not `approved`, do not claim the change has passed design review or is ready to archive
@@ -38,3 +38,9 @@ tags: [conventions, workflow, change, ospec]
38
38
  - optional step の有効化は `.skillrc.workflow` で管理する
39
39
  - proposal flags は workflow 設定と整合していなければならない
40
40
  - 有効化された optional step は `tasks.md` と `verification.md` に必ず出す
41
+
42
+ ## Plugin Gates
43
+
44
+ - プラグイン機能は `.skillrc.plugins` で管理する
45
+ - Stitch / Checkpoint のインストール、provider 切り替え、doctor 修復、MCP、認証設定、またはプラグイン有効化に関わる場合は、まずプロジェクト採用文書言語に一致するリポジトリ内のローカライズ済みプラグイン仕様を読む
46
+ - その言語の仕様書が存在しない場合のみ、別言語の仕様書へフォールバックする
@@ -47,7 +47,7 @@ tags: [conventions, workflow, change, ospec]
47
47
  - `ospec plugins run stitch <change-path>` 默认走已配置的 Stitch provider 适配器;如果项目显式覆写 `.skillrc.plugins.stitch.runner`,则走自定义 Stitch bridge / wrapper
48
48
  - 使用自定义 runner 时,可通过 `token_env` 约束额外 token;使用内建 Gemini 适配器时,通常应在 `%USERPROFILE%/.gemini/settings.json` 的 `mcpServers.stitch` 中配置认证信息
49
49
  - 可通过 `ospec plugins doctor stitch <project-path>` 检查 runner、provider CLI、stitch MCP 与认证提示状态
50
- - 涉及 Stitch 安装、provider 切换、doctor 修复、MCP 或认证配置时,先读取仓库内 Stitch 规范;若存在 `docs/stitch-plugin-spec.zh-CN.md`,必须以该文档中的配置片段为准,不得为通过检查而临时拼出另一套配置
50
+ - 涉及 Stitch / Checkpoint 安装、provider 切换、doctor 修复、MCP、认证配置或插件启用时,先读取与项目文档语言一致的仓库内本地化插件规范;只有该语言文件缺失时,才回退到其他语言版本,不得为通过检查而临时拼出另一套配置
51
51
  - 如果仓库里没有 Stitch 规范文档,则使用内建基线:`gemini` 改 `%USERPROFILE%/.gemini/settings.json` 的 `mcpServers.stitch.httpUrl` 与 `headers.X-Goog-Api-Key`;`codex` 改 `%USERPROFILE%/.codex/config.toml` 的 `[mcp_servers.stitch]`,并设置 `type = "http"`、`url = "https://stitch.googleapis.com/mcp"`、`X-Goog-Api-Key`
52
52
  - 如果内建 `codex` provider 下只读调用正常,但写操作卡在本地未真正进入 `mcp_tool_call`,优先检查是否真正走了 `codex exec --dangerously-bypass-approvals-and-sandbox`
53
53
  - 如果项目覆写了自定义 Codex runner / wrapper,自定义运行链也必须显式带上 `--dangerously-bypass-approvals-and-sandbox`
@@ -32,4 +32,4 @@ export declare class BatchOperations {
32
32
  }>;
33
33
  private matchesQuery;
34
34
  }
35
- export declare const batchOperations: BatchOperations;
35
+ export declare const batchOperations: BatchOperations;