@clawplays/ospec-cli 0.3.2 → 0.3.4

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 (35) hide show
  1. package/README.md +5 -1
  2. package/SKILL.md +278 -0
  3. package/agents/openai.yaml +4 -0
  4. package/assets/for-ai/ar/ai-guide.md +55 -0
  5. package/assets/for-ai/ar/execution-protocol.md +44 -0
  6. package/assets/for-ai/ja-JP/ai-guide.md +55 -0
  7. package/assets/for-ai/ja-JP/execution-protocol.md +44 -0
  8. package/assets/project-conventions/ar/development-guide.md +31 -0
  9. package/assets/project-conventions/ar/naming-conventions.md +37 -0
  10. package/assets/project-conventions/ar/skill-conventions.md +33 -0
  11. package/assets/project-conventions/ar/workflow-conventions.md +40 -0
  12. package/assets/project-conventions/ja-JP/development-guide.md +31 -0
  13. package/assets/project-conventions/ja-JP/naming-conventions.md +45 -0
  14. package/assets/project-conventions/ja-JP/skill-conventions.md +33 -0
  15. package/assets/project-conventions/ja-JP/workflow-conventions.md +40 -0
  16. package/dist/cli.js +2 -2
  17. package/dist/commands/NewCommand.js +39 -8
  18. package/dist/core/types.d.ts +1 -0
  19. package/dist/presets/ProjectPresets.d.ts +2 -2
  20. package/dist/presets/ProjectPresets.js +195 -69
  21. package/dist/services/ConfigManager.js +6 -0
  22. package/dist/services/ProjectAssetRegistry.d.ts +2 -2
  23. package/dist/services/ProjectAssetRegistry.js +12 -0
  24. package/dist/services/ProjectAssetService.js +7 -1
  25. package/dist/services/ProjectScaffoldCommandService.js +55 -21
  26. package/dist/services/ProjectScaffoldService.js +108 -12
  27. package/dist/services/ProjectService.js +229 -558
  28. package/dist/services/templates/ExecutionTemplateBuilder.js +235 -9
  29. package/dist/services/templates/ProjectTemplateBuilder.js +878 -276
  30. package/dist/services/templates/TemplateBuilderBase.d.ts +2 -2
  31. package/dist/services/templates/TemplateBuilderBase.js +12 -3
  32. package/dist/services/templates/TemplateInputFactory.js +102 -47
  33. package/dist/services/templates/templateTypes.d.ts +1 -1
  34. package/package.json +4 -1
  35. package/skill.yaml +151 -0
@@ -225,6 +225,10 @@ class ProjectService {
225
225
 
226
226
  const normalized = await this.normalizeProjectBootstrap(rootDir, mode, input);
227
227
 
228
+ config.documentLanguage = normalized.documentLanguage;
229
+
230
+ await this.configManager.saveConfig(rootDir, config);
231
+
228
232
 
229
233
 
230
234
 
@@ -991,31 +995,9 @@ class ProjectService {
991
995
 
992
996
 
993
997
 
994
- const normalized = await this.normalizeProjectBootstrap(rootDir, config.mode, {
995
-
996
-
997
-
998
-
999
-
1000
-
1001
-
1002
- ...(await this.getBootstrapUpgradePlan(rootDir)),
1003
-
1004
-
1005
-
1006
-
1007
-
1008
-
1009
-
1010
- ...(input ?? {}),
1011
-
1012
-
1013
-
1014
-
1015
-
1016
-
998
+ const normalized = await this.normalizeProjectBootstrap(rootDir, config.mode, input);
1017
999
 
1018
- });
1000
+ await this.syncConfigDocumentLanguage(rootDir, config, normalized.documentLanguage);
1019
1001
 
1020
1002
 
1021
1003
 
@@ -1351,7 +1333,9 @@ class ProjectService {
1351
1333
 
1352
1334
 
1353
1335
 
1354
- const normalized = await this.normalizeProjectBootstrap(rootDir, config.mode, await this.getBootstrapUpgradePlan(rootDir));
1336
+ const normalized = await this.normalizeProjectBootstrap(rootDir, config.mode);
1337
+
1338
+ const configLanguageUpdated = await this.syncConfigDocumentLanguage(rootDir, config, normalized.documentLanguage);
1355
1339
 
1356
1340
 
1357
1341
 
@@ -1465,6 +1449,10 @@ class ProjectService {
1465
1449
 
1466
1450
  const skippedFiles = [...directCopyResult.skipped];
1467
1451
 
1452
+ if (configLanguageUpdated) {
1453
+ refreshedFiles.push(constants_1.FILE_NAMES.SKILLRC);
1454
+ }
1455
+
1468
1456
 
1469
1457
 
1470
1458
 
@@ -1823,15 +1811,11 @@ class ProjectService {
1823
1811
 
1824
1812
 
1825
1813
 
1826
- const fallbackName = path_1.default.basename(path_1.default.resolve(rootDir));
1827
-
1828
-
1829
-
1830
-
1831
-
1814
+ const normalized = await this.normalizeProjectBootstrap(rootDir, mode, input);
1832
1815
 
1816
+ config.documentLanguage = normalized.documentLanguage;
1833
1817
 
1834
- const normalized = this.templateEngine.normalizeProjectBootstrapInput(input, fallbackName, mode);
1818
+ await this.configManager.saveConfig(rootDir, config);
1835
1819
 
1836
1820
 
1837
1821
 
@@ -5155,18 +5139,26 @@ class ProjectService {
5155
5139
  .find(block => block && !block.startsWith('#') && !block.startsWith('- '))
5156
5140
  ?.replace(/\r?\n/g, ' ')
5157
5141
  .trim() || '';
5158
- const [overviewContent, techStackContent, architectureContent, readmeContent, localizedReadmeContent, inferredSummary, inferredTechStack] = await Promise.all([
5142
+ const persistedDocumentLanguage = await this.getConfiguredDocumentLanguage(rootDir);
5143
+ const [overviewContent, techStackContent, architectureContent, readmeContent, zhReadmeContent, jaReadmeContent, arReadmeContent, aiGuideContent, executionProtocolContent, inferredSummary, inferredTechStack] = await Promise.all([
5159
5144
  readMarkdown(path_1.default.join(docsRoot, 'overview.md')),
5160
5145
  readMarkdown(path_1.default.join(docsRoot, 'tech-stack.md')),
5161
5146
  readMarkdown(path_1.default.join(docsRoot, 'architecture.md')),
5162
5147
  readMarkdown(path_1.default.join(rootDir, constants_1.FILE_NAMES.README)),
5163
5148
  readMarkdown(path_1.default.join(rootDir, 'README.zh-CN.md')),
5149
+ readMarkdown(path_1.default.join(rootDir, 'README.ja.md')),
5150
+ readMarkdown(path_1.default.join(rootDir, 'README.ar.md')),
5151
+ readMarkdown(path_1.default.join(rootDir, constants_1.DIR_NAMES.FOR_AI, 'ai-guide.md')),
5152
+ readMarkdown(path_1.default.join(rootDir, constants_1.DIR_NAMES.FOR_AI, 'execution-protocol.md')),
5164
5153
  this.inferBootstrapSummary(rootDir),
5165
5154
  this.inferBootstrapTechStack(rootDir),
5166
5155
  ]);
5156
+ const localizedReadmeContents = [zhReadmeContent, jaReadmeContent, arReadmeContent];
5167
5157
  const summary = extractParagraph(overviewContent) ||
5168
5158
  extractParagraph(readmeContent) ||
5169
- extractParagraph(localizedReadmeContent) ||
5159
+ localizedReadmeContents
5160
+ .map(content => extractParagraph(content))
5161
+ .find(Boolean) ||
5170
5162
  inferredSummary;
5171
5163
  const explicitTechStack = extractBulletList(techStackContent);
5172
5164
  const documentLanguage = this.detectDocumentLanguageFromTexts([
@@ -5174,7 +5166,9 @@ class ProjectService {
5174
5166
  techStackContent,
5175
5167
  architectureContent,
5176
5168
  readmeContent,
5177
- localizedReadmeContent,
5169
+ ...localizedReadmeContents,
5170
+ aiGuideContent,
5171
+ executionProtocolContent,
5178
5172
  ]);
5179
5173
  const modules = await this.inferBootstrapModules(rootDir);
5180
5174
  const apiDocs = await this.scanApiDocs(rootDir);
@@ -5195,7 +5189,7 @@ class ProjectService {
5195
5189
  planningDocs: planningDocs
5196
5190
  .filter(item => item.name.toLowerCase() !== 'readme.md')
5197
5191
  .map(item => item.name.replace(/\.md$/i, '').replace(/-/g, ' ')),
5198
- documentLanguage,
5192
+ documentLanguage: persistedDocumentLanguage || documentLanguage,
5199
5193
  };
5200
5194
  }
5201
5195
 
@@ -5321,21 +5315,69 @@ class ProjectService {
5321
5315
  }
5322
5316
  return Array.from(stack);
5323
5317
  }
5318
+ normalizeDocumentLanguage(input) {
5319
+ return input === 'en-US' || input === 'zh-CN' || input === 'ja-JP' || input === 'ar'
5320
+ ? input
5321
+ : undefined;
5322
+ }
5323
+ async getConfiguredDocumentLanguage(rootDir) {
5324
+ try {
5325
+ const config = await this.configManager.loadConfig(rootDir);
5326
+ return this.normalizeDocumentLanguage(config?.documentLanguage);
5327
+ }
5328
+ catch {
5329
+ return undefined;
5330
+ }
5331
+ }
5332
+ async syncConfigDocumentLanguage(rootDir, config, documentLanguage) {
5333
+ const normalized = this.normalizeDocumentLanguage(documentLanguage);
5334
+ if (!normalized || config?.documentLanguage === normalized) {
5335
+ return false;
5336
+ }
5337
+ config.documentLanguage = normalized;
5338
+ await this.configManager.saveConfig(rootDir, config);
5339
+ return true;
5340
+ }
5324
5341
 
5325
5342
  detectDocumentLanguageFromTexts(contents) {
5326
5343
  for (const content of contents) {
5327
- if (typeof content !== 'string' || content.trim().length === 0) {
5328
- continue;
5329
- }
5330
- if (/[一-龥]/.test(content)) {
5331
- return 'zh-CN';
5332
- }
5333
- if (/[A-Za-z]/.test(content)) {
5334
- return 'en-US';
5344
+ const detected = this.detectDocumentLanguageFromText(content);
5345
+ if (detected) {
5346
+ return detected;
5335
5347
  }
5336
5348
  }
5337
5349
  return undefined;
5338
5350
  }
5351
+ detectDocumentLanguageFromText(content) {
5352
+ if (typeof content !== 'string' || content.trim().length === 0) {
5353
+ return undefined;
5354
+ }
5355
+ if (/[\u0600-\u06FF]/.test(content)) {
5356
+ return 'ar';
5357
+ }
5358
+ if (/[ぁ-ゟ゠-ヿ]/.test(content)) {
5359
+ return 'ja-JP';
5360
+ }
5361
+ if (this.isLikelyJapaneseKanjiContent(content)) {
5362
+ return 'ja-JP';
5363
+ }
5364
+ if (/[一-龥]/.test(content)) {
5365
+ return 'zh-CN';
5366
+ }
5367
+ if (/[A-Za-z]/.test(content)) {
5368
+ return 'en-US';
5369
+ }
5370
+ return undefined;
5371
+ }
5372
+ isLikelyJapaneseKanjiContent(content) {
5373
+ if (!/[一-龥]/.test(content)) {
5374
+ return false;
5375
+ }
5376
+ if (/[々〆ヵヶ「」『』]/.test(content)) {
5377
+ return true;
5378
+ }
5379
+ return /(一覧|詳細|設定|権限|検索|構成|変更|確認|対応|連携|承認|申請|手順|履歴|機能|実装|設計|運用|画面|帳票|組織|拠点|区分|種別|完了|開始|終了|表示|取得|追加|削除|更新|登録)/.test(content);
5380
+ }
5339
5381
 
5340
5382
 
5341
5383
 
@@ -5847,14 +5889,6 @@ class ProjectService {
5847
5889
 
5848
5890
 
5849
5891
 
5850
- const fallbackName = path_1.default.basename(path_1.default.resolve(rootDir));
5851
-
5852
-
5853
-
5854
-
5855
-
5856
-
5857
-
5858
5892
  const inferredModules = await this.inferBootstrapModules(rootDir);
5859
5893
 
5860
5894
 
@@ -5863,31 +5897,7 @@ class ProjectService {
5863
5897
 
5864
5898
 
5865
5899
 
5866
- const presetDefaults = this.getPresetDefaults(input);
5867
-
5868
-
5869
-
5870
-
5871
-
5872
-
5873
-
5874
- const normalized = this.templateEngine.normalizeProjectBootstrapInput(input, fallbackName, mode, {
5875
-
5876
-
5877
-
5878
-
5879
-
5880
-
5881
-
5882
- modules: inferredModules,
5883
-
5884
-
5885
-
5886
-
5887
-
5888
-
5889
-
5890
- }, presetDefaults);
5900
+ const normalized = await this.normalizeProjectBootstrap(rootDir, mode, input);
5891
5901
 
5892
5902
 
5893
5903
 
@@ -6359,7 +6369,15 @@ class ProjectService {
6359
6369
 
6360
6370
 
6361
6371
 
6362
- await this.projectAssetService.installDirectCopyAssets(rootDir);
6372
+ const documentLanguage = (await this.getBootstrapUpgradePlan(rootDir)).documentLanguage || 'en-US';
6373
+
6374
+
6375
+
6376
+
6377
+
6378
+
6379
+
6380
+ await this.projectAssetService.installDirectCopyAssets(rootDir, documentLanguage);
6363
6381
 
6364
6382
 
6365
6383
 
@@ -7878,6 +7896,38 @@ class ProjectService {
7878
7896
 
7879
7897
 
7880
7898
 
7899
+ const mergedInput = {
7900
+
7901
+
7902
+
7903
+
7904
+
7905
+
7906
+
7907
+ ...(await this.getBootstrapUpgradePlan(rootDir)),
7908
+
7909
+
7910
+
7911
+
7912
+
7913
+
7914
+
7915
+ ...(input ?? {}),
7916
+
7917
+
7918
+
7919
+
7920
+
7921
+
7922
+
7923
+ };
7924
+
7925
+
7926
+
7927
+
7928
+
7929
+
7930
+
7881
7931
  const inferredDefaults = {
7882
7932
 
7883
7933
 
@@ -7902,7 +7952,7 @@ class ProjectService {
7902
7952
 
7903
7953
 
7904
7954
 
7905
- const presetDefaults = this.getPresetDefaults(input);
7955
+ const presetDefaults = this.getPresetDefaults(mergedInput);
7906
7956
 
7907
7957
 
7908
7958
 
@@ -7910,7 +7960,7 @@ class ProjectService {
7910
7960
 
7911
7961
 
7912
7962
 
7913
- return this.templateEngine.normalizeProjectBootstrapInput(input, projectName, mode, inferredDefaults, presetDefaults);
7963
+ return this.templateEngine.normalizeProjectBootstrapInput(mergedInput, projectName, mode, inferredDefaults, presetDefaults);
7914
7964
 
7915
7965
 
7916
7966
 
@@ -8438,23 +8488,22 @@ class ProjectService {
8438
8488
 
8439
8489
 
8440
8490
 
8441
- return (content.includes('Layer: protocol shell') ||
8442
-
8443
-
8444
-
8445
-
8446
-
8447
-
8448
-
8449
- content.includes('协议壳') ||
8450
-
8451
-
8452
-
8453
-
8454
-
8455
-
8456
-
8457
- content.includes('project knowledge: not generated yet'));
8491
+ try {
8492
+ const parsed = (0, gray_matter_1.default)(content);
8493
+ const tags = Array.isArray(parsed.data?.tags)
8494
+ ? parsed.data.tags.filter((tag) => typeof tag === 'string')
8495
+ : [];
8496
+ if (!tags.includes('protocol-shell')) {
8497
+ return false;
8498
+ }
8499
+ return (parsed.content.includes('Project knowledge: not generated yet') ||
8500
+ parsed.content.includes('项目知识:尚未生成') ||
8501
+ parsed.content.includes('プロジェクト知識: まだ生成されていません') ||
8502
+ parsed.content.includes('معرفة المشروع: لم يتم توليدها بعد'));
8503
+ }
8504
+ catch {
8505
+ return false;
8506
+ }
8458
8507
 
8459
8508
 
8460
8509
 
@@ -8911,513 +8960,130 @@ class ProjectService {
8911
8960
 
8912
8961
 
8913
8962
  renderProtocolShellRootSkill(projectName, documentLanguage, mode) {
8914
-
8915
-
8916
-
8917
-
8918
-
8919
-
8920
-
8921
- const isEnglish = documentLanguage === 'en-US';
8922
-
8923
-
8924
-
8925
-
8926
-
8927
-
8928
-
8929
- const title = isEnglish ? `${projectName} Protocol Shell` : `${projectName} 协议壳`;
8930
-
8931
-
8932
-
8933
-
8934
-
8935
-
8936
-
8937
- const body = isEnglish
8938
-
8939
-
8940
-
8941
-
8942
-
8943
-
8944
-
8963
+ const title = documentLanguage === 'zh-CN'
8964
+ ? `${projectName} 协议壳`
8965
+ : documentLanguage === 'ja-JP'
8966
+ ? `${projectName} プロトコルシェル`
8967
+ : documentLanguage === 'ar'
8968
+ ? `${projectName} غلاف البروتوكول`
8969
+ : `${projectName} Protocol Shell`;
8970
+ const body = documentLanguage === 'zh-CN'
8945
8971
  ? `# ${projectName}
8946
8972
 
8973
+ > 层级:协议壳
8947
8974
 
8975
+ ## 当前状态
8948
8976
 
8977
+ - 项目:${projectName}
8978
+ - 模式:${mode}
8979
+ - 状态:已完成 OSpec 协议壳初始化
8980
+ - 项目知识:尚未生成
8949
8981
 
8982
+ ## 首先阅读
8950
8983
 
8984
+ - [AI 指南](for-ai/ai-guide.md)
8985
+ - [执行协议](for-ai/execution-protocol.md)
8986
+ - [命名规范](for-ai/naming-conventions.md)
8987
+ - [技能规范](for-ai/skill-conventions.md)
8988
+ - [工作流规范](for-ai/workflow-conventions.md)
8989
+ - [开发指南](for-ai/development-guide.md)
8951
8990
 
8991
+ ## 说明
8952
8992
 
8993
+ - 当前仓库仅包含 OSpec 协议壳。
8994
+ - 项目文档、源码结构、测试入口与业务 scaffold 需后续通过明确命令或技能生成。
8995
+ - 如果项目启用了 Stitch 且某个 active change 激活了 \`stitch_design_review\`,继续执行或声称可归档前,先检查 \`changes/active/<change>/artifacts/stitch/approval.json\`。
8996
+ - Active change 位于 \`changes/active/<change>\`。`
8997
+ : documentLanguage === 'ja-JP'
8998
+ ? `# ${projectName}
8953
8999
 
9000
+ > レイヤー: プロトコルシェル
8954
9001
 
9002
+ ## 現在の状態
8955
9003
 
9004
+ - プロジェクト: ${projectName}
9005
+ - モード: ${mode}
9006
+ - 状態: OSpec のプロトコルシェルは初期化済み
9007
+ - プロジェクト知識: まだ生成されていません
8956
9008
 
9009
+ ## 最初に読むもの
8957
9010
 
9011
+ - [AI ガイド](for-ai/ai-guide.md)
9012
+ - [実行プロトコル](for-ai/execution-protocol.md)
9013
+ - [命名規約](for-ai/naming-conventions.md)
9014
+ - [SKILL 規約](for-ai/skill-conventions.md)
9015
+ - [ワークフロー規約](for-ai/workflow-conventions.md)
9016
+ - [開発ガイド](for-ai/development-guide.md)
8958
9017
 
9018
+ ## メモ
8959
9019
 
9020
+ - このリポジトリには現在 OSpec のプロトコルシェルのみがあります。
9021
+ - プロジェクト文書、ソース構造、テスト導線、業務用 scaffold は後で明示的なコマンドまたはスキルで生成してください。
9022
+ - Stitch が有効で、active change が \`stitch_design_review\` を有効化している場合は、作業継続や archive 可否を主張する前に \`changes/active/<change>/artifacts/stitch/approval.json\` を確認してください。
9023
+ - active change は \`changes/active/<change>\` にあります。`
9024
+ : documentLanguage === 'ar'
9025
+ ? `# ${projectName}
8960
9026
 
8961
- > Layer: protocol shell
8962
-
8963
-
8964
-
8965
-
8966
-
8967
-
8968
-
9027
+ > الطبقة: غلاف البروتوكول
8969
9028
 
9029
+ ## الحالة الحالية
8970
9030
 
9031
+ - المشروع: ${projectName}
9032
+ - النمط: ${mode}
9033
+ - الحالة: تم تهيئة غلاف بروتوكول OSpec
9034
+ - معرفة المشروع: لم يتم توليدها بعد
8971
9035
 
9036
+ ## اقرأ أولاً
8972
9037
 
9038
+ - [دليل الذكاء الاصطناعي](for-ai/ai-guide.md)
9039
+ - [بروتوكول التنفيذ](for-ai/execution-protocol.md)
9040
+ - [اتفاقيات التسمية](for-ai/naming-conventions.md)
9041
+ - [اتفاقيات SKILL](for-ai/skill-conventions.md)
9042
+ - [اتفاقيات سير العمل](for-ai/workflow-conventions.md)
9043
+ - [دليل التطوير](for-ai/development-guide.md)
8973
9044
 
9045
+ ## ملاحظات
8974
9046
 
9047
+ - يحتوي هذا المستودع حالياً على غلاف بروتوكول OSpec فقط.
9048
+ - يجب إنشاء وثائق المشروع وبنية المصدر ومسار الاختبارات والـ scaffold الخاص بالأعمال لاحقاً عبر أوامر أو مهارات صريحة.
9049
+ - إذا كان Stitch مفعلاً وكان التغيير النشط يفعّل \`stitch_design_review\`، فافحص \`changes/active/<change>/artifacts/stitch/approval.json\` قبل متابعة التنفيذ أو الادعاء بأن الأرشفة جاهزة.
9050
+ - توجد التغييرات النشطة تحت \`changes/active/<change>\` .`
9051
+ : `# ${projectName}
8975
9052
 
9053
+ > Layer: protocol shell
8976
9054
 
8977
9055
  ## Current State
8978
9056
 
8979
-
8980
-
8981
-
8982
-
8983
-
8984
-
8985
-
8986
-
8987
-
8988
-
8989
-
8990
-
8991
-
8992
-
8993
9057
  - Project: ${projectName}
8994
-
8995
-
8996
-
8997
-
8998
-
8999
-
9000
-
9001
9058
  - Mode: ${mode}
9002
-
9003
-
9004
-
9005
-
9006
-
9007
-
9008
-
9009
9059
  - Status: OSpec protocol shell initialized
9010
-
9011
-
9012
-
9013
-
9014
-
9015
-
9016
-
9017
9060
  - Project knowledge: not generated yet
9018
9061
 
9019
-
9020
-
9021
-
9022
-
9023
-
9024
-
9025
-
9026
-
9027
-
9028
-
9029
-
9030
-
9031
-
9032
-
9033
9062
  ## Read First
9034
9063
 
9064
+ - [AI guide](for-ai/ai-guide.md)
9065
+ - [Execution protocol](for-ai/execution-protocol.md)
9066
+ - [Naming conventions](for-ai/naming-conventions.md)
9067
+ - [Skill conventions](for-ai/skill-conventions.md)
9068
+ - [Workflow conventions](for-ai/workflow-conventions.md)
9069
+ - [Development guide](for-ai/development-guide.md)
9035
9070
 
9036
-
9037
-
9038
-
9039
-
9040
-
9041
-
9042
-
9043
-
9044
-
9045
-
9046
-
9047
-
9048
-
9049
- - [AI guide](for-ai/ai-guide.md)
9050
-
9051
-
9052
-
9053
-
9054
-
9055
-
9056
-
9057
- - [Execution protocol](for-ai/execution-protocol.md)
9058
-
9059
-
9060
-
9061
-
9062
-
9063
-
9064
-
9065
- - [Naming conventions](for-ai/naming-conventions.md)
9066
-
9067
-
9068
-
9069
-
9070
-
9071
-
9072
-
9073
- - [Skill conventions](for-ai/skill-conventions.md)
9074
-
9075
-
9076
-
9077
-
9078
-
9079
-
9080
-
9081
- - [Workflow conventions](for-ai/workflow-conventions.md)
9082
-
9083
-
9084
-
9085
-
9086
-
9087
-
9088
-
9089
- - [Development guide](for-ai/development-guide.md)
9090
-
9091
-
9092
-
9093
-
9094
-
9095
-
9096
-
9097
-
9098
-
9099
-
9100
-
9101
-
9102
-
9103
-
9104
-
9105
- ## Notes
9106
-
9107
-
9108
-
9109
-
9110
-
9111
-
9112
-
9113
-
9114
-
9115
-
9116
-
9117
-
9118
-
9119
-
9071
+ ## Notes
9120
9072
 
9121
9073
  - This repository currently contains only the OSpec protocol shell.
9122
-
9123
-
9124
-
9125
-
9126
-
9127
-
9128
-
9129
9074
  - Project docs, source structure, tests, and business scaffold should be generated later through explicit skills or commands.
9130
-
9131
9075
  - If Stitch is enabled and an active change triggers \`stitch_design_review\`, inspect \`changes/active/<change>/artifacts/stitch/approval.json\` before continuing execution or archive claims.
9132
-
9133
-
9134
-
9135
-
9136
-
9137
-
9138
-
9139
- - Active changes live under \`changes/active/<change>\`.`
9140
-
9141
-
9142
-
9143
-
9144
-
9145
-
9146
-
9147
- : `# ${projectName}
9148
-
9149
-
9150
-
9151
-
9152
-
9153
-
9154
-
9155
-
9156
-
9157
-
9158
-
9159
-
9160
-
9161
-
9162
-
9163
- > 层级:协议壳
9164
-
9165
-
9166
-
9167
-
9168
-
9169
-
9170
-
9171
-
9172
-
9173
-
9174
-
9175
-
9176
-
9177
-
9178
-
9179
- ## 当前状态
9180
-
9181
-
9182
-
9183
-
9184
-
9185
-
9186
-
9187
-
9188
-
9189
-
9190
-
9191
-
9192
-
9193
-
9194
-
9195
- - 项目:${projectName}
9196
-
9197
-
9198
-
9199
-
9200
-
9201
-
9202
-
9203
- - 模式:${mode}
9204
-
9205
-
9206
-
9207
-
9208
-
9209
-
9210
-
9211
- - 状态:已完成 OSpec 协议壳初始化
9212
-
9213
-
9214
-
9215
-
9216
-
9217
-
9218
-
9219
- - 项目知识:尚未生成
9220
-
9221
-
9222
-
9223
-
9224
-
9225
-
9226
-
9227
-
9228
-
9229
-
9230
-
9231
-
9232
-
9233
-
9234
-
9235
- ## 优先阅读
9236
-
9237
-
9238
-
9239
-
9240
-
9241
-
9242
-
9243
-
9244
-
9245
-
9246
-
9247
-
9248
-
9249
-
9250
-
9251
- - [AI 指南](for-ai/ai-guide.md)
9252
-
9253
-
9254
-
9255
-
9256
-
9257
-
9258
-
9259
- - [执行协议](for-ai/execution-protocol.md)
9260
-
9261
-
9262
-
9263
-
9264
-
9265
-
9266
-
9267
- - [命名规范](for-ai/naming-conventions.md)
9268
-
9269
-
9270
-
9271
-
9272
-
9273
-
9274
-
9275
- - [SKILL 规范](for-ai/skill-conventions.md)
9276
-
9277
-
9278
-
9279
-
9280
-
9281
-
9282
-
9283
- - [workflow 规范](for-ai/workflow-conventions.md)
9284
-
9285
-
9286
-
9287
-
9288
-
9289
-
9290
-
9291
- - [开发指南](for-ai/development-guide.md)
9292
-
9293
-
9294
-
9295
-
9296
-
9297
-
9298
-
9299
-
9300
-
9301
-
9302
-
9303
-
9304
-
9305
-
9306
-
9307
- ## 说明
9308
-
9309
-
9310
-
9311
-
9312
-
9313
-
9314
-
9315
-
9316
-
9317
-
9318
-
9319
-
9320
-
9321
-
9322
-
9323
- - 当前仓库只完成了 OSpec 协议壳初始化。
9324
-
9325
-
9326
-
9327
-
9328
-
9329
-
9330
-
9331
- - 项目 docs、源码结构、测试结构和业务 scaffold 应由后续显式技能或命令逐步生成。
9332
-
9333
- - 如果项目启用了 Stitch,且某个 active change 激活了 \`stitch_design_review\`,继续执行或宣称可归档前必须先检查 \`changes/active/<change>/artifacts/stitch/approval.json\`。
9334
-
9335
-
9336
-
9337
-
9338
-
9339
-
9340
-
9341
- - 活跃变更位于 \`changes/active/<change>\`。`;
9342
-
9343
-
9344
-
9345
-
9346
-
9347
-
9348
-
9076
+ - Active changes live under \`changes/active/<change>\`.`;
9349
9077
  return `---
9350
-
9351
-
9352
-
9353
-
9354
-
9355
-
9356
-
9357
9078
  name: ${projectName}
9358
-
9359
-
9360
-
9361
-
9362
-
9363
-
9364
-
9365
9079
  title: ${title}
9366
-
9367
-
9368
-
9369
-
9370
-
9371
-
9372
-
9373
- tags: [ospec, protocol-shell, ${mode}]
9374
-
9375
-
9376
-
9377
-
9378
-
9379
-
9380
-
9080
+ tags: [ospec, bootstrap, protocol-shell]
9381
9081
  ---
9382
9082
 
9383
-
9384
-
9385
-
9386
-
9387
-
9388
-
9389
-
9390
-
9391
-
9392
-
9393
-
9394
-
9395
-
9396
-
9397
9083
  ${body}
9398
-
9399
-
9400
-
9401
-
9402
-
9403
-
9404
-
9405
9084
  `;
9406
-
9407
-
9408
-
9409
-
9410
-
9411
-
9412
-
9413
9085
  }
9414
9086
 
9415
-
9416
-
9417
-
9418
-
9419
-
9420
-
9421
9087
  async writeBootstrapSummary(rootDir, input) {
9422
9088
 
9423
9089
 
@@ -10250,7 +9916,12 @@ ${formatSuggestion()}
10250
9916
 
10251
9917
 
10252
9918
 
10253
- const language = input?.documentLanguage ?? 'zh-CN';
9919
+ const language = input?.documentLanguage === 'zh-CN' ||
9920
+ input?.documentLanguage === 'en-US' ||
9921
+ input?.documentLanguage === 'ja-JP' ||
9922
+ input?.documentLanguage === 'ar'
9923
+ ? input.documentLanguage
9924
+ : 'en-US';
10254
9925
 
10255
9926
 
10256
9927