@clawplays/ospec-cli 0.3.10 → 0.4.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.
- package/README.md +5 -2
- package/assets/for-ai/ar/ai-guide.md +2 -2
- package/assets/for-ai/ar/execution-protocol.md +1 -1
- package/assets/for-ai/en-US/ai-guide.md +3 -3
- package/assets/for-ai/en-US/execution-protocol.md +3 -3
- package/assets/for-ai/ja-JP/ai-guide.md +2 -2
- package/assets/for-ai/ja-JP/execution-protocol.md +2 -2
- package/assets/for-ai/zh-CN/ai-guide.md +3 -3
- package/assets/for-ai/zh-CN/execution-protocol.md +3 -3
- package/assets/global-skills/claude/ospec-change/SKILL.md +2 -2
- package/assets/global-skills/codex/ospec-change/SKILL.md +2 -2
- package/assets/project-conventions/ar/workflow-conventions.md +6 -0
- package/assets/project-conventions/en-US/workflow-conventions.md +1 -1
- package/assets/project-conventions/ja-JP/workflow-conventions.md +6 -0
- package/assets/project-conventions/zh-CN/workflow-conventions.md +1 -1
- package/dist/adapters/codex-stitch-adapter.js +4 -4
- package/dist/adapters/gemini-stitch-adapter.js +3 -3
- package/dist/adapters/playwright-checkpoint-adapter.js +40 -95
- package/dist/advanced/StatePersistence.js +1 -2
- package/dist/cli.js +3 -712
- package/dist/commands/ArchiveCommand.js +8 -13
- package/dist/commands/ChangesCommand.js +1 -1
- package/dist/commands/DocsCommand.js +1 -1
- package/dist/commands/FinalizeCommand.js +1 -1
- package/dist/commands/InitCommand.js +1 -1
- package/dist/commands/NewCommand.d.ts +1 -1
- package/dist/commands/NewCommand.js +1 -1
- package/dist/commands/PluginsCommand.d.ts +9 -1
- package/dist/commands/PluginsCommand.js +166 -21
- package/dist/commands/QueueCommand.d.ts +1 -1
- package/dist/commands/QueueCommand.js +11 -5
- package/dist/commands/RunCommand.d.ts +1 -1
- package/dist/commands/RunCommand.js +11 -5
- package/dist/commands/SkillCommand.d.ts +1 -1
- package/dist/commands/SkillCommand.js +2 -371
- package/dist/commands/StatusCommand.js +1 -1
- package/dist/commands/UpdateCommand.d.ts +1 -1
- package/dist/commands/UpdateCommand.js +1 -1
- package/dist/commands/VerifyCommand.js +3 -6
- package/dist/commands/WorkflowCommand.d.ts +1 -1
- package/dist/commands/WorkflowCommand.js +1 -1
- package/dist/commands/index.d.ts +1 -20
- package/dist/commands/index.js +1 -41
- package/dist/core/constants.js +1 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/presets/ProjectPresets.d.ts +1 -1
- package/dist/presets/ProjectPresets.js +1 -1
- package/dist/services/ConfigManager.js +1 -1
- package/dist/services/FileService.d.ts +2 -2
- package/dist/services/FileService.js +33 -12
- package/dist/services/IndexBuilder.js +24 -12
- package/dist/services/ProjectAssetRegistry.d.ts +1 -1
- package/dist/services/ProjectAssetRegistry.js +1 -1
- package/dist/services/ProjectAssetService.d.ts +1 -1
- package/dist/services/ProjectAssetService.js +1 -1
- package/dist/services/ProjectScaffoldCommandService.js +1 -1
- package/dist/services/ProjectScaffoldService.js +1 -1
- package/dist/services/ProjectService.d.ts +1 -1
- package/dist/services/ProjectService.js +314 -10457
- package/dist/services/QueueService.d.ts +1 -1
- package/dist/services/QueueService.js +7 -7
- package/dist/services/RunService.d.ts +1 -1
- package/dist/services/RunService.js +6 -6
- package/dist/services/SkillParser.js +3 -6
- package/dist/services/StateManager.d.ts +1 -1
- package/dist/services/StateManager.js +1 -1
- package/dist/services/TemplateGenerator.js +1 -1
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/templates/ExecutionTemplateBuilder.js +91 -91
- package/dist/services/templates/ProjectTemplateBuilder.js +5 -5
- package/dist/services/templates/TemplateBuilderBase.d.ts +1 -1
- package/dist/services/templates/TemplateBuilderBase.js +1 -1
- package/dist/services/templates/TemplateInputFactory.js +4 -2
- package/dist/services/templates/templateTypes.d.ts +1 -1
- package/dist/tools/build-index.js +634 -759
- package/dist/utils/PathUtils.d.ts +1 -1
- package/dist/utils/PathUtils.js +1 -1
- package/dist/utils/helpers.d.ts +6 -0
- package/dist/utils/helpers.js +39 -1
- package/dist/utils/subcommandHelp.d.ts +1 -1
- package/dist/utils/subcommandHelp.js +4 -4
- package/dist/workflow/PluginWorkflowComposer.d.ts +1 -1
- package/dist/workflow/PluginWorkflowComposer.js +1 -1
- package/dist/workflow/index.d.ts +2 -2
- package/dist/workflow/index.js +1 -1
- package/package.json +4 -29
- package/scripts/postinstall.js +6 -2
package/README.md
CHANGED
|
@@ -285,6 +285,9 @@ ospec plugins enable checkpoint . --base-url http://127.0.0.1:3000
|
|
|
285
285
|
Notes:
|
|
286
286
|
|
|
287
287
|
- `--base-url` points to the running app used by automated checks
|
|
288
|
+
- Enabling the built-in Checkpoint runner automatically installs `playwright`, `pixelmatch`, and `pngjs` into the target project
|
|
289
|
+
- If a user asks an AI assistant to enable Checkpoint, that install step must complete before the plugin should be considered successfully enabled
|
|
290
|
+
- Disabling Checkpoint only turns off the plugin configuration; it does not uninstall those project dependencies
|
|
288
291
|
|
|
289
292
|
</details>
|
|
290
293
|
|
|
@@ -300,8 +303,8 @@ Notes:
|
|
|
300
303
|
|
|
301
304
|
### Plugin Specs
|
|
302
305
|
|
|
303
|
-
- [Stitch Plugin Spec](docs/stitch-plugin-spec.
|
|
304
|
-
- [Checkpoint Plugin Spec](docs/checkpoint-plugin-spec.
|
|
306
|
+
- [Stitch Plugin Spec](docs/stitch-plugin-spec.md)
|
|
307
|
+
- [Checkpoint Plugin Spec](docs/checkpoint-plugin-spec.md)
|
|
305
308
|
|
|
306
309
|
## Repository Structure
|
|
307
310
|
|
|
@@ -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 أو
|
|
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 المحلية
|
|
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. إذا
|
|
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,
|
|
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 spec that matches the project document language first; only fall back when that language-specific file is missing
|
|
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;
|
|
44
|
+
- For Stitch installation, provider switching, doctor remediation, MCP setup, or auth setup, read the repo-local localized Stitch spec first; copy the documented Gemini / Codex 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
|
|
@@ -56,7 +56,7 @@ This document is the project-adopted AI guide copied from the OSpec mother spec.
|
|
|
56
56
|
|
|
57
57
|
## Stitch Provider Baseline
|
|
58
58
|
|
|
59
|
-
- When
|
|
59
|
+
- When the repo contains a localized Stitch plugin spec that matches the project document language, use its original config snippets first.
|
|
60
60
|
- When the repo does not contain that spec and the built-in Stitch provider must be enabled, use these baselines.
|
|
61
61
|
- `gemini`: edit `%USERPROFILE%/.gemini/settings.json` and use `mcpServers.stitch.httpUrl` plus `headers.X-Goog-Api-Key`.
|
|
62
62
|
|
|
@@ -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
|
|
18
|
+
8. If Stitch or Checkpoint provider, MCP, auth, install, or enable config must be changed, read the repo-local localized plugin spec that matches the project document language first; only fall back to another localized spec when the matching file is missing
|
|
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;
|
|
39
|
+
- If `plugins doctor stitch` reveals provider, MCP, or auth issues, return to the repo-local localized Stitch spec first; do not invent an alternate `command` / `args` / `env` or stdio-proxy config outside that spec
|
|
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
|
|
@@ -49,7 +49,7 @@ If the project rules differ from the mother spec, the project-adopted rules take
|
|
|
49
49
|
|
|
50
50
|
## Stitch Provider Baseline
|
|
51
51
|
|
|
52
|
-
- If the project contains
|
|
52
|
+
- If the project contains a localized Stitch plugin spec matching the project document language, provider / MCP / auth config must follow that spec first.
|
|
53
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
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
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.
|
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
-
|
|
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.
|
|
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
|
|
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
|
-
-
|
|
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,7 @@ 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,
|
|
29
|
+
5. If Stitch or Checkpoint installation, provider switching, doctor remediation, MCP setup, auth setup, or plugin enablement is involved, read the repo-local localized plugin spec that matches the project document language first. Only fall back to another localized spec when the matching file is missing.
|
|
30
30
|
6. If the user explicitly asks for queue behavior, inspect `changes/queued/` before creating new queue items.
|
|
31
31
|
7. `changes/active/<change>/proposal.md`
|
|
32
32
|
8. `changes/active/<change>/tasks.md`
|
|
@@ -57,7 +57,7 @@ When `.skillrc.plugins.stitch.enabled = true` and `.skillrc.plugins.stitch.capab
|
|
|
57
57
|
- treat the built-in `stitch` plugin with the configured provider adapter as the default path unless `.skillrc.plugins.stitch.runner` is explicitly overridden
|
|
58
58
|
- if a custom runner is configured and `token_env` is set but missing, stop and request configuration first
|
|
59
59
|
- 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;
|
|
60
|
+
- if Stitch installation, provider switching, doctor remediation, MCP setup, or auth setup is involved, read the repo-local localized Stitch plugin spec first; use its documented Gemini / Codex config snippets instead of inventing `command` / `args` / `env` or stdio-proxy settings
|
|
61
61
|
- if the repo-local Stitch spec is missing, use these built-in baselines instead of guessing:
|
|
62
62
|
- `gemini`: `%USERPROFILE%/.gemini/settings.json` -> `mcpServers.stitch.httpUrl = "https://stitch.googleapis.com/mcp"` and `headers.X-Goog-Api-Key`
|
|
63
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]`
|
|
@@ -27,7 +27,7 @@ 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,
|
|
30
|
+
5. If Stitch or Checkpoint installation, provider switching, doctor remediation, MCP setup, auth setup, or plugin enablement is involved, read the repo-local localized plugin spec that matches the project document language first. Only fall back to another localized spec when the matching file is missing.
|
|
31
31
|
6. If the user explicitly asks for queue behavior, inspect `changes/queued/` before creating new queue items.
|
|
32
32
|
7. `changes/active/<change>/proposal.md`
|
|
33
33
|
8. `changes/active/<change>/tasks.md`
|
|
@@ -58,7 +58,7 @@ When `.skillrc.plugins.stitch.enabled = true` and `.skillrc.plugins.stitch.capab
|
|
|
58
58
|
- treat the built-in `stitch` plugin with the configured provider adapter as the default path unless `.skillrc.plugins.stitch.runner` is explicitly overridden
|
|
59
59
|
- if a custom runner is configured and `token_env` is set but missing, stop and request configuration first
|
|
60
60
|
- 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;
|
|
61
|
+
- if Stitch installation, provider switching, doctor remediation, MCP setup, or auth setup is involved, read the repo-local localized Stitch plugin spec first; use its documented Gemini / Codex config snippets instead of inventing `command` / `args` / `env` or stdio-proxy settings
|
|
62
62
|
- if the repo-local Stitch spec is missing, use these built-in baselines instead of guessing:
|
|
63
63
|
- `gemini`: `%USERPROFILE%/.gemini/settings.json` -> `mcpServers.stitch.httpUrl = "https://stitch.googleapis.com/mcp"` and `headers.X-Goog-Api-Key`
|
|
64
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]`
|
|
@@ -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,7 +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,
|
|
53
|
+
- For Stitch or Checkpoint installation, provider switching, doctor remediation, MCP setup, auth setup, or plugin enablement, read the repo-local plugin spec that matches the project's adopted document language first; only fall back to another localized spec when that language-specific file is missing
|
|
54
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`
|
|
55
55
|
- 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
56
|
- If the project overrides a custom Codex runner / wrapper, that custom execution path must also pass `--dangerously-bypass-approvals-and-sandbox`
|
|
@@ -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
|
|
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`
|
|
@@ -353,13 +353,13 @@ if (!codexSettings.stitchConfigured) {
|
|
|
353
353
|
fail(`Codex stitch MCP is not configured in ${codexSettings.settingsPath}. Add [mcp_servers.stitch] before using the built-in adapter.`, '', 'missing_mcp');
|
|
354
354
|
}
|
|
355
355
|
if (!codexSettings.stitchTransportHttp) {
|
|
356
|
-
fail(`Codex stitch MCP in ${codexSettings.settingsPath} must set type = "http". Follow the Codex snippet from
|
|
356
|
+
fail(`Codex stitch MCP in ${codexSettings.settingsPath} must set type = "http". Follow the Codex snippet from the repo-local localized Stitch plugin spec.`, '', 'missing_transport');
|
|
357
357
|
}
|
|
358
358
|
if (!codexSettings.stitchUrlConfigured) {
|
|
359
|
-
fail(`Codex stitch MCP in ${codexSettings.settingsPath} must set url = "https://stitch.googleapis.com/mcp". Follow the Codex snippet from
|
|
359
|
+
fail(`Codex stitch MCP in ${codexSettings.settingsPath} must set url = "https://stitch.googleapis.com/mcp". Follow the Codex snippet from the repo-local localized Stitch plugin spec.`, '', 'missing_url');
|
|
360
360
|
}
|
|
361
361
|
if (!codexSettings.stitchAuthConfigured) {
|
|
362
|
-
fail(`Codex stitch MCP in ${codexSettings.settingsPath} must set X-Goog-Api-Key in headers or [mcp_servers.stitch.http_headers]. Follow the Codex snippet from
|
|
362
|
+
fail(`Codex stitch MCP in ${codexSettings.settingsPath} must set X-Goog-Api-Key in headers or [mcp_servers.stitch.http_headers]. Follow the Codex snippet from the repo-local localized Stitch plugin spec.`, '', 'missing_auth');
|
|
363
363
|
}
|
|
364
364
|
const statePath = path.join(changePath, 'state.json');
|
|
365
365
|
const proposalPath = path.join(changePath, 'proposal.md');
|
|
@@ -417,4 +417,4 @@ if (responseJsonBlock) {
|
|
|
417
417
|
parsedResponse = null;
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
process.stdout.write(`${JSON.stringify(normalizeResult(parsedResponse, rawResponse, requestedModel))}\n`);
|
|
420
|
+
process.stdout.write(`${JSON.stringify(normalizeResult(parsedResponse, rawResponse, requestedModel))}\n`);
|
|
@@ -340,10 +340,10 @@ if (!geminiSettings.stitchConfigured) {
|
|
|
340
340
|
fail(`Gemini CLI stitch MCP is not configured in ${geminiSettings.settingsPath}. Add mcpServers.stitch before using the built-in adapter.`);
|
|
341
341
|
}
|
|
342
342
|
if (!geminiSettings.stitchHttpUrlConfigured) {
|
|
343
|
-
fail(`Gemini CLI stitch MCP in ${geminiSettings.settingsPath} must set httpUrl = "https://stitch.googleapis.com/mcp". Follow the Gemini snippet from
|
|
343
|
+
fail(`Gemini CLI stitch MCP in ${geminiSettings.settingsPath} must set httpUrl = "https://stitch.googleapis.com/mcp". Follow the Gemini snippet from the repo-local localized Stitch plugin spec.`);
|
|
344
344
|
}
|
|
345
345
|
if (!geminiSettings.stitchAuthConfigured) {
|
|
346
|
-
fail(`Gemini CLI stitch MCP in ${geminiSettings.settingsPath} must set headers["X-Goog-Api-Key"]. Follow the Gemini snippet from
|
|
346
|
+
fail(`Gemini CLI stitch MCP in ${geminiSettings.settingsPath} must set headers["X-Goog-Api-Key"]. Follow the Gemini snippet from the repo-local localized Stitch plugin spec.`);
|
|
347
347
|
}
|
|
348
348
|
const statePath = path.join(changePath, 'state.json');
|
|
349
349
|
const proposalPath = path.join(changePath, 'proposal.md');
|
|
@@ -405,4 +405,4 @@ if (responseJsonBlock) {
|
|
|
405
405
|
parsedResponse = null;
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
process.stdout.write(`${JSON.stringify(normalizeResult(parsedResponse, responseText, requestedModel))}\n`);
|
|
408
|
+
process.stdout.write(`${JSON.stringify(normalizeResult(parsedResponse, responseText, requestedModel))}\n`);
|