@clawplays/ospec-cli 0.3.3 → 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 (32) hide show
  1. package/README.md +5 -1
  2. package/assets/for-ai/ar/ai-guide.md +55 -0
  3. package/assets/for-ai/ar/execution-protocol.md +44 -0
  4. package/assets/for-ai/ja-JP/ai-guide.md +55 -0
  5. package/assets/for-ai/ja-JP/execution-protocol.md +44 -0
  6. package/assets/project-conventions/ar/development-guide.md +31 -0
  7. package/assets/project-conventions/ar/naming-conventions.md +37 -0
  8. package/assets/project-conventions/ar/skill-conventions.md +33 -0
  9. package/assets/project-conventions/ar/workflow-conventions.md +40 -0
  10. package/assets/project-conventions/ja-JP/development-guide.md +31 -0
  11. package/assets/project-conventions/ja-JP/naming-conventions.md +45 -0
  12. package/assets/project-conventions/ja-JP/skill-conventions.md +33 -0
  13. package/assets/project-conventions/ja-JP/workflow-conventions.md +40 -0
  14. package/dist/cli.js +2 -2
  15. package/dist/commands/NewCommand.js +39 -8
  16. package/dist/core/types.d.ts +1 -0
  17. package/dist/presets/ProjectPresets.d.ts +2 -2
  18. package/dist/presets/ProjectPresets.js +195 -69
  19. package/dist/services/ConfigManager.js +6 -0
  20. package/dist/services/ProjectAssetRegistry.d.ts +2 -2
  21. package/dist/services/ProjectAssetRegistry.js +12 -0
  22. package/dist/services/ProjectAssetService.js +7 -1
  23. package/dist/services/ProjectScaffoldCommandService.js +55 -21
  24. package/dist/services/ProjectScaffoldService.js +108 -12
  25. package/dist/services/ProjectService.js +229 -558
  26. package/dist/services/templates/ExecutionTemplateBuilder.js +235 -9
  27. package/dist/services/templates/ProjectTemplateBuilder.js +878 -276
  28. package/dist/services/templates/TemplateBuilderBase.d.ts +2 -2
  29. package/dist/services/templates/TemplateBuilderBase.js +12 -3
  30. package/dist/services/templates/TemplateInputFactory.js +102 -47
  31. package/dist/services/templates/templateTypes.d.ts +1 -1
  32. package/package.json +1 -1
@@ -234,7 +234,7 @@ export default function RootLayout({
234
234
  children: React.ReactNode;
235
235
  }) {
236
236
  return (
237
- <html lang="${normalized.documentLanguage === 'zh-CN' ? 'zh-CN' : 'en'}">
237
+ <html lang="${this.getHtmlLang(normalized.documentLanguage)}">
238
238
  <body>
239
239
  <SiteShell>${'\n'} {children}${'\n'} </SiteShell>
240
240
  </body>
@@ -245,25 +245,75 @@ export default function RootLayout({
245
245
  case 'app/page.tsx':
246
246
  return this.renderHomePage(normalized);
247
247
  case 'app/docs/page.tsx':
248
- return this.renderSectionPage(normalized, normalized.documentLanguage === 'zh-CN' ? '文档中心' : 'Docs Center', normalized.documentLanguage === 'zh-CN'
248
+ return this.renderSectionPage(normalized, normalized.documentLanguage === 'zh-CN'
249
+ ? '文档中心'
250
+ : normalized.documentLanguage === 'ja-JP'
251
+ ? 'ドキュメントセンター'
252
+ : normalized.documentLanguage === 'ar'
253
+ ? 'مركز الوثائق'
254
+ : 'Docs Center', normalized.documentLanguage === 'zh-CN'
249
255
  ? '在这里沉淀架构说明、API 边界和团队执行流程。'
250
- : 'Document architecture, API boundaries, and team workflows in one place.');
256
+ : normalized.documentLanguage === 'ja-JP'
257
+ ? 'ここでアーキテクチャ、API 境界、チームの実行フローをまとめます。'
258
+ : normalized.documentLanguage === 'ar'
259
+ ? 'دوّن هنا المعمارية وحدود API ومسارات تنفيذ الفريق في مكان واحد.'
260
+ : 'Document architecture, API boundaries, and team workflows in one place.');
251
261
  case 'app/blog/page.tsx':
252
- return this.renderSectionPage(normalized, normalized.documentLanguage === 'zh-CN' ? '博客与更新日志' : 'Blog & Changelog', normalized.documentLanguage === 'zh-CN'
262
+ return this.renderSectionPage(normalized, normalized.documentLanguage === 'zh-CN'
263
+ ? '博客与更新日志'
264
+ : normalized.documentLanguage === 'ja-JP'
265
+ ? 'ブログと変更履歴'
266
+ : normalized.documentLanguage === 'ar'
267
+ ? 'المدونة وسجل التغييرات'
268
+ : 'Blog & Changelog', normalized.documentLanguage === 'zh-CN'
253
269
  ? '在这里发布产品更新、版本发布说明和技术长文。'
254
- : 'Publish product updates, release notes, and long-form technical posts.');
270
+ : normalized.documentLanguage === 'ja-JP'
271
+ ? 'ここで製品アップデート、リリースノート、技術記事を公開します。'
272
+ : normalized.documentLanguage === 'ar'
273
+ ? 'انشر هنا تحديثات المنتج وملاحظات الإصدار والمقالات التقنية الطويلة.'
274
+ : 'Publish product updates, release notes, and long-form technical posts.');
255
275
  case 'app/admin/page.tsx':
256
- return this.renderSectionPage(normalized, normalized.documentLanguage === 'zh-CN' ? '后台控制台' : 'Admin Console', normalized.documentLanguage === 'zh-CN'
276
+ return this.renderSectionPage(normalized, normalized.documentLanguage === 'zh-CN'
277
+ ? '后台控制台'
278
+ : normalized.documentLanguage === 'ja-JP'
279
+ ? '管理コンソール'
280
+ : normalized.documentLanguage === 'ar'
281
+ ? 'وحدة التحكم الإدارية'
282
+ : 'Admin Console', normalized.documentLanguage === 'zh-CN'
257
283
  ? '在这里承接内容工作流、发布条目和审核队列。'
258
- : 'Operate content workflows, release entries, and editorial review queues.');
284
+ : normalized.documentLanguage === 'ja-JP'
285
+ ? 'ここでコンテンツワークフロー、公開項目、レビュー待ちキューを扱います。'
286
+ : normalized.documentLanguage === 'ar'
287
+ ? 'أدر هنا سير عمل المحتوى وعناصر النشر وطوابير المراجعة التحريرية.'
288
+ : 'Operate content workflows, release entries, and editorial review queues.');
259
289
  case 'app/login/page.tsx':
260
- return this.renderSectionPage(normalized, normalized.documentLanguage === 'zh-CN' ? '鉴权入口' : 'Authentication', normalized.documentLanguage === 'zh-CN'
290
+ return this.renderSectionPage(normalized, normalized.documentLanguage === 'zh-CN'
291
+ ? '鉴权入口'
292
+ : normalized.documentLanguage === 'ja-JP'
293
+ ? '認証入口'
294
+ : normalized.documentLanguage === 'ar'
295
+ ? 'بوابة المصادقة'
296
+ : 'Authentication', normalized.documentLanguage === 'zh-CN'
261
297
  ? '后续可在这里接入身份提供方、角色策略和团队登录流程。'
262
- : 'Connect your future identity provider, role policies, and staff sign-in flows here.');
298
+ : normalized.documentLanguage === 'ja-JP'
299
+ ? 'ここで将来の ID プロバイダー、権限ポリシー、チーム向けサインインフローを接続できます。'
300
+ : normalized.documentLanguage === 'ar'
301
+ ? 'اربط هنا لاحقاً مزود الهوية وسياسات الأدوار ومسارات تسجيل دخول الفريق.'
302
+ : 'Connect your future identity provider, role policies, and staff sign-in flows here.');
263
303
  case 'app/account/page.tsx':
264
- return this.renderSectionPage(normalized, normalized.documentLanguage === 'zh-CN' ? '账户中心' : 'Account', normalized.documentLanguage === 'zh-CN'
304
+ return this.renderSectionPage(normalized, normalized.documentLanguage === 'zh-CN'
305
+ ? '账户中心'
306
+ : normalized.documentLanguage === 'ja-JP'
307
+ ? 'アカウント'
308
+ : normalized.documentLanguage === 'ar'
309
+ ? 'الحساب'
310
+ : 'Account', normalized.documentLanguage === 'zh-CN'
265
311
  ? '在这里管理登录用户的工作区、个人资料和团队级设置。'
266
- : 'Manage the signed-in user workspace, profile, and team-level settings.');
312
+ : normalized.documentLanguage === 'ja-JP'
313
+ ? 'ここでログイン済みユーザーのワークスペース、プロフィール、チーム設定を管理します。'
314
+ : normalized.documentLanguage === 'ar'
315
+ ? 'أدِر هنا مساحة عمل المستخدم المسجّل وملفه الشخصي وإعدادات الفريق.'
316
+ : 'Manage the signed-in user workspace, profile, and team-level settings.');
267
317
  case 'app/api/health/route.ts':
268
318
  return `export async function GET() {
269
319
  return Response.json({
@@ -460,6 +510,8 @@ export function SiteShell({ children }: { children: React.ReactNode }) {
460
510
  const normalized = value.trim().toLowerCase();
461
511
  return (!normalized ||
462
512
  normalized === '待补充' ||
513
+ normalized === '未定' ||
514
+ normalized === 'قيد التحديد' ||
463
515
  normalized === 'todo' ||
464
516
  normalized === 'tbd' ||
465
517
  normalized.includes('<') ||
@@ -468,6 +520,18 @@ export function SiteShell({ children }: { children: React.ReactNode }) {
468
520
  escapeTemplateString(value) {
469
521
  return value.replace(/\\/g, '\\\\').replace(/'/g, "\\'");
470
522
  }
523
+ getHtmlLang(documentLanguage) {
524
+ if (documentLanguage === 'zh-CN') {
525
+ return 'zh-CN';
526
+ }
527
+ if (documentLanguage === 'ja-JP') {
528
+ return 'ja';
529
+ }
530
+ if (documentLanguage === 'ar') {
531
+ return 'ar';
532
+ }
533
+ return 'en';
534
+ }
471
535
  getCopy(normalized) {
472
536
  if (normalized.documentLanguage === 'zh-CN') {
473
537
  return {
@@ -485,6 +549,38 @@ export function SiteShell({ children }: { children: React.ReactNode }) {
485
549
  navAccount: '账户',
486
550
  };
487
551
  }
552
+ if (normalized.documentLanguage === 'ja-JP') {
553
+ return {
554
+ heroBadge: 'OSpec スキャフォールド',
555
+ scaffoldBadge: 'OSpec により業務 scaffold を生成済み',
556
+ projectSummary: 'プロジェクト概要',
557
+ initialModules: '初期モジュール',
558
+ fillModulesHint: 'OSpec のプロジェクト文書でモジュール計画をさらに補ってください。',
559
+ projectLabel: 'プロジェクトページ',
560
+ navHome: 'ホーム',
561
+ navDocs: 'Docs',
562
+ navBlog: 'ブログ',
563
+ navAdmin: 'Admin',
564
+ navLogin: 'ログイン',
565
+ navAccount: 'アカウント',
566
+ };
567
+ }
568
+ if (normalized.documentLanguage === 'ar') {
569
+ return {
570
+ heroBadge: 'هيكل OSpec',
571
+ scaffoldBadge: 'تم توليد scaffold الأعمال بواسطة OSpec',
572
+ projectSummary: 'ملخص المشروع',
573
+ initialModules: 'الوحدات الأولية',
574
+ fillModulesHint: 'واصل تحسين تخطيط الوحدات في وثائق مشروع OSpec.',
575
+ projectLabel: 'صفحة المشروع',
576
+ navHome: 'الرئيسية',
577
+ navDocs: 'الوثائق',
578
+ navBlog: 'المدونة',
579
+ navAdmin: 'الإدارة',
580
+ navLogin: 'تسجيل الدخول',
581
+ navAccount: 'الحساب',
582
+ };
583
+ }
488
584
  return {
489
585
  heroBadge: 'OSpec Scaffold',
490
586
  scaffoldBadge: 'Business scaffold generated by OSpec',
@@ -504,4 +600,4 @@ export function SiteShell({ children }: { children: React.ReactNode }) {
504
600
  exports.ProjectScaffoldService = ProjectScaffoldService;
505
601
  const createProjectScaffoldService = (fileService) => new ProjectScaffoldService(fileService);
506
602
  exports.createProjectScaffoldService = createProjectScaffoldService;
507
- //# sourceMappingURL=ProjectScaffoldService.js.map
603
+ //# sourceMappingURL=ProjectScaffoldService.js.map