@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.
- package/README.md +5 -1
- package/SKILL.md +278 -0
- package/agents/openai.yaml +4 -0
- package/assets/for-ai/ar/ai-guide.md +55 -0
- package/assets/for-ai/ar/execution-protocol.md +44 -0
- package/assets/for-ai/ja-JP/ai-guide.md +55 -0
- package/assets/for-ai/ja-JP/execution-protocol.md +44 -0
- package/assets/project-conventions/ar/development-guide.md +31 -0
- package/assets/project-conventions/ar/naming-conventions.md +37 -0
- package/assets/project-conventions/ar/skill-conventions.md +33 -0
- package/assets/project-conventions/ar/workflow-conventions.md +40 -0
- package/assets/project-conventions/ja-JP/development-guide.md +31 -0
- package/assets/project-conventions/ja-JP/naming-conventions.md +45 -0
- package/assets/project-conventions/ja-JP/skill-conventions.md +33 -0
- package/assets/project-conventions/ja-JP/workflow-conventions.md +40 -0
- package/dist/cli.js +2 -2
- package/dist/commands/NewCommand.js +39 -8
- package/dist/core/types.d.ts +1 -0
- package/dist/presets/ProjectPresets.d.ts +2 -2
- package/dist/presets/ProjectPresets.js +195 -69
- package/dist/services/ConfigManager.js +6 -0
- package/dist/services/ProjectAssetRegistry.d.ts +2 -2
- package/dist/services/ProjectAssetRegistry.js +12 -0
- package/dist/services/ProjectAssetService.js +7 -1
- package/dist/services/ProjectScaffoldCommandService.js +55 -21
- package/dist/services/ProjectScaffoldService.js +108 -12
- package/dist/services/ProjectService.js +229 -558
- package/dist/services/templates/ExecutionTemplateBuilder.js +235 -9
- package/dist/services/templates/ProjectTemplateBuilder.js +878 -276
- package/dist/services/templates/TemplateBuilderBase.d.ts +2 -2
- package/dist/services/templates/TemplateBuilderBase.js +12 -3
- package/dist/services/templates/TemplateInputFactory.js +102 -47
- package/dist/services/templates/templateTypes.d.ts +1 -1
- package/package.json +4 -1
- package/skill.yaml +151 -0
|
@@ -83,13 +83,79 @@ ${this.formatList(context.outOfScope, 'TBD')}
|
|
|
83
83
|
## Acceptance Criteria
|
|
84
84
|
|
|
85
85
|
${this.formatChecklist(context.acceptanceCriteria, 'TBD')}`;
|
|
86
|
+
const ja = `## 背景
|
|
87
|
+
|
|
88
|
+
${context.background}
|
|
89
|
+
|
|
90
|
+
## プロジェクト文脈
|
|
91
|
+
|
|
92
|
+
**プロジェクト文書:**
|
|
93
|
+
${this.formatReferenceList(projectDocs, '未定')}
|
|
94
|
+
|
|
95
|
+
**関連モジュール SKILL:**
|
|
96
|
+
${this.formatReferenceList(moduleSkills, '未定')}
|
|
97
|
+
|
|
98
|
+
**関連 API 文書:**
|
|
99
|
+
${this.formatReferenceList(apiDocs, '未定')}
|
|
100
|
+
|
|
101
|
+
**関連する設計 / 計画文書:**
|
|
102
|
+
${this.formatReferenceList(designAndPlanningDocs, '未定')}
|
|
103
|
+
|
|
104
|
+
## 目標
|
|
105
|
+
|
|
106
|
+
${this.formatList(context.goals, '未定')}
|
|
107
|
+
|
|
108
|
+
## 範囲
|
|
109
|
+
|
|
110
|
+
**対象:**
|
|
111
|
+
${this.formatList(context.inScope, '未定')}
|
|
112
|
+
|
|
113
|
+
**対象外:**
|
|
114
|
+
${this.formatList(context.outOfScope, '未定')}
|
|
115
|
+
|
|
116
|
+
## 受け入れ条件
|
|
117
|
+
|
|
118
|
+
${this.formatChecklist(context.acceptanceCriteria, '未定')}`;
|
|
119
|
+
const ar = `## الخلفية
|
|
120
|
+
|
|
121
|
+
${context.background}
|
|
122
|
+
|
|
123
|
+
## سياق المشروع
|
|
124
|
+
|
|
125
|
+
**وثائق المشروع:**
|
|
126
|
+
${this.formatReferenceList(projectDocs, 'قيد التحديد')}
|
|
127
|
+
|
|
128
|
+
**ملفات SKILL للوحدات ذات الصلة:**
|
|
129
|
+
${this.formatReferenceList(moduleSkills, 'قيد التحديد')}
|
|
130
|
+
|
|
131
|
+
**وثائق API ذات الصلة:**
|
|
132
|
+
${this.formatReferenceList(apiDocs, 'قيد التحديد')}
|
|
133
|
+
|
|
134
|
+
**وثائق التصميم / التخطيط ذات الصلة:**
|
|
135
|
+
${this.formatReferenceList(designAndPlanningDocs, 'قيد التحديد')}
|
|
136
|
+
|
|
137
|
+
## الأهداف
|
|
138
|
+
|
|
139
|
+
${this.formatList(context.goals, 'قيد التحديد')}
|
|
140
|
+
|
|
141
|
+
## النطاق
|
|
142
|
+
|
|
143
|
+
**ضمن النطاق:**
|
|
144
|
+
${this.formatList(context.inScope, 'قيد التحديد')}
|
|
145
|
+
|
|
146
|
+
**خارج النطاق:**
|
|
147
|
+
${this.formatList(context.outOfScope, 'قيد التحديد')}
|
|
148
|
+
|
|
149
|
+
## معايير القبول
|
|
150
|
+
|
|
151
|
+
${this.formatChecklist(context.acceptanceCriteria, 'قيد التحديد')}`;
|
|
86
152
|
return this.withFrontmatter({
|
|
87
153
|
name: context.feature,
|
|
88
154
|
status: context.placement === 'queued' ? 'queued' : 'active',
|
|
89
155
|
created,
|
|
90
156
|
affects: context.affects,
|
|
91
157
|
flags: context.flags,
|
|
92
|
-
}, this.copy(context.documentLanguage, zh, en));
|
|
158
|
+
}, this.copy(context.documentLanguage, zh, en, ja, ar));
|
|
93
159
|
}
|
|
94
160
|
generateTasksTemplate(input) {
|
|
95
161
|
const context = this.inputs.normalizeFeatureTemplateInput(input);
|
|
@@ -106,6 +172,16 @@ ${this.formatChecklist(context.acceptanceCriteria, 'TBD')}`;
|
|
|
106
172
|
.map((step, index) => `- [ ] ${index + 7}. Finish docs and verification for optional step \`${step}\``)
|
|
107
173
|
.join('\n')
|
|
108
174
|
: '';
|
|
175
|
+
const optionalStepTasksJa = context.optionalSteps.length > 0
|
|
176
|
+
? context.optionalSteps
|
|
177
|
+
.map((step, index) => `- [ ] ${index + 7}. オプション手順 \`${step}\` の文書と検証を完了する`)
|
|
178
|
+
.join('\n')
|
|
179
|
+
: '';
|
|
180
|
+
const optionalStepTasksAr = context.optionalSteps.length > 0
|
|
181
|
+
? context.optionalSteps
|
|
182
|
+
.map((step, index) => `- [ ] ${index + 7}. أكمل التوثيق والتحقق للخطوة الاختيارية \`${step}\``)
|
|
183
|
+
.join('\n')
|
|
184
|
+
: '';
|
|
109
185
|
const zh = `## 上下文引用
|
|
110
186
|
|
|
111
187
|
**项目文档:**
|
|
@@ -140,11 +216,45 @@ ${this.formatReferenceList(moduleSkills, 'TBD')}
|
|
|
140
216
|
- [ ] 5. Rebuild \`SKILL.index.json\`
|
|
141
217
|
- [ ] 6. Run verification and update \`verification.md\`
|
|
142
218
|
${optionalStepTasksEn}`.trim();
|
|
219
|
+
const ja = `## 参照コンテキスト
|
|
220
|
+
|
|
221
|
+
**プロジェクト文書:**
|
|
222
|
+
${this.formatReferenceList(projectDocs, '未定')}
|
|
223
|
+
|
|
224
|
+
**モジュール SKILL:**
|
|
225
|
+
${this.formatReferenceList(moduleSkills, '未定')}
|
|
226
|
+
|
|
227
|
+
## タスクチェックリスト
|
|
228
|
+
|
|
229
|
+
- [ ] 1. change を実装する
|
|
230
|
+
- [ ] 2. この change の境界に合わせてプロジェクト計画文書を揃える
|
|
231
|
+
- [ ] 3. 影響を受ける \`SKILL.md\` を更新する
|
|
232
|
+
- [ ] 4. 関連する API / 設計 / 計画文書を更新する
|
|
233
|
+
- [ ] 5. \`SKILL.index.json\` を再生成する
|
|
234
|
+
- [ ] 6. 検証を実行して \`verification.md\` を更新する
|
|
235
|
+
${optionalStepTasksJa}`.trim();
|
|
236
|
+
const ar = `## مراجع السياق
|
|
237
|
+
|
|
238
|
+
**وثائق المشروع:**
|
|
239
|
+
${this.formatReferenceList(projectDocs, 'قيد التحديد')}
|
|
240
|
+
|
|
241
|
+
**ملفات SKILL للوحدات:**
|
|
242
|
+
${this.formatReferenceList(moduleSkills, 'قيد التحديد')}
|
|
243
|
+
|
|
244
|
+
## قائمة المهام
|
|
245
|
+
|
|
246
|
+
- [ ] 1. نفّذ التغيير
|
|
247
|
+
- [ ] 2. وحّد وثائق تخطيط المشروع مع حدود هذا change
|
|
248
|
+
- [ ] 3. حدّث ملفات \`SKILL.md\` المتأثرة
|
|
249
|
+
- [ ] 4. حدّث وثائق API / التصميم / التخطيط ذات الصلة
|
|
250
|
+
- [ ] 5. أعد بناء \`SKILL.index.json\`
|
|
251
|
+
- [ ] 6. نفّذ التحقق وحدّث \`verification.md\`
|
|
252
|
+
${optionalStepTasksAr}`.trim();
|
|
143
253
|
return this.withFrontmatter({
|
|
144
254
|
feature: context.feature,
|
|
145
255
|
created,
|
|
146
256
|
optional_steps: context.optionalSteps,
|
|
147
|
-
}, this.copy(context.documentLanguage, zh, en));
|
|
257
|
+
}, this.copy(context.documentLanguage, zh, en, ja, ar));
|
|
148
258
|
}
|
|
149
259
|
generateVerificationTemplate(input) {
|
|
150
260
|
const context = this.inputs.normalizeFeatureTemplateInput(input);
|
|
@@ -202,13 +312,59 @@ ${this.formatChecklist(context.acceptanceCriteria, 'Acceptance item 1')}
|
|
|
202
312
|
## Decision
|
|
203
313
|
|
|
204
314
|
- [ ] Ready to archive`;
|
|
315
|
+
const ja = `## 自動検証
|
|
316
|
+
|
|
317
|
+
- [ ] build が通過した
|
|
318
|
+
- [ ] lint が通過した
|
|
319
|
+
- [ ] test が通過した
|
|
320
|
+
- [ ] インデックスを再生成した
|
|
321
|
+
- [ ] spec-check が通過した
|
|
322
|
+
|
|
323
|
+
## プロジェクト同期レビュー
|
|
324
|
+
|
|
325
|
+
${this.formatReferenceChecklist(projectDocs, 'プロジェクト文書を確認済み')}
|
|
326
|
+
|
|
327
|
+
${this.formatReferenceChecklist(moduleSkills, '関連モジュール SKILL を確認済み')}
|
|
328
|
+
|
|
329
|
+
${this.formatReferenceChecklist(linkedKnowledgeDocs, '関連する API / 設計 / 計画文書を確認済み')}
|
|
330
|
+
|
|
331
|
+
## 受け入れ確認
|
|
332
|
+
|
|
333
|
+
${this.formatChecklist(context.acceptanceCriteria, '受け入れ条件 1')}
|
|
334
|
+
|
|
335
|
+
## 判定
|
|
336
|
+
|
|
337
|
+
- [ ] archive 可能`;
|
|
338
|
+
const ar = `## التحقق الآلي
|
|
339
|
+
|
|
340
|
+
- [ ] نجح build
|
|
341
|
+
- [ ] نجح lint
|
|
342
|
+
- [ ] نجح test
|
|
343
|
+
- [ ] أُعيد بناء الفهرس
|
|
344
|
+
- [ ] نجح spec-check
|
|
345
|
+
|
|
346
|
+
## مراجعة مزامنة المشروع
|
|
347
|
+
|
|
348
|
+
${this.formatReferenceChecklist(projectDocs, 'تمت مراجعة وثائق المشروع')}
|
|
349
|
+
|
|
350
|
+
${this.formatReferenceChecklist(moduleSkills, 'تمت مراجعة ملفات SKILL ذات الصلة')}
|
|
351
|
+
|
|
352
|
+
${this.formatReferenceChecklist(linkedKnowledgeDocs, 'تمت مراجعة وثائق API / التصميم / التخطيط ذات الصلة')}
|
|
353
|
+
|
|
354
|
+
## مراجعة القبول
|
|
355
|
+
|
|
356
|
+
${this.formatChecklist(context.acceptanceCriteria, 'معيار قبول 1')}
|
|
357
|
+
|
|
358
|
+
## القرار
|
|
359
|
+
|
|
360
|
+
- [ ] جاهز للأرشفة`;
|
|
205
361
|
return this.withFrontmatter({
|
|
206
362
|
feature: context.feature,
|
|
207
363
|
created,
|
|
208
364
|
status: context.placement === 'queued' ? 'queued' : 'verifying',
|
|
209
365
|
optional_steps: context.optionalSteps,
|
|
210
366
|
passed_optional_steps: [],
|
|
211
|
-
}, this.copy(context.documentLanguage, zh, en));
|
|
367
|
+
}, this.copy(context.documentLanguage, zh, en, ja, ar));
|
|
212
368
|
}
|
|
213
369
|
generateReviewTemplate(input) {
|
|
214
370
|
const context = this.inputs.normalizeFeatureTemplateInput(input);
|
|
@@ -221,21 +377,23 @@ ${this.formatChecklist(context.acceptanceCriteria, 'Acceptance item 1')}
|
|
|
221
377
|
...(context.projectContext.planningDocs ?? []),
|
|
222
378
|
];
|
|
223
379
|
const affects = context.affects.length > 0 ? context.affects.join(', ') : 'TBD';
|
|
224
|
-
const
|
|
380
|
+
const affectsJa = context.affects.length > 0 ? context.affects.join(', ') : '未定';
|
|
381
|
+
const affectsAr = context.affects.length > 0 ? context.affects.join(', ') : 'قيد التحديد';
|
|
382
|
+
const zh = `## 评审范围
|
|
225
383
|
|
|
226
384
|
- Change: \`${context.feature}\`
|
|
227
385
|
- Mode: \`${context.mode}\`
|
|
228
386
|
- Affects: ${context.affects.length > 0 ? context.affects.join(', ') : '待补充'}
|
|
229
387
|
|
|
230
|
-
##
|
|
388
|
+
## 上下文引用
|
|
231
389
|
|
|
232
|
-
|
|
390
|
+
**项目文档:**
|
|
233
391
|
${this.formatReferenceList(projectDocs, '待补充')}
|
|
234
392
|
|
|
235
|
-
|
|
393
|
+
**模块技能:**
|
|
236
394
|
${this.formatReferenceList(moduleSkills, '待补充')}
|
|
237
395
|
|
|
238
|
-
**API /
|
|
396
|
+
**API / 设计 / 计划文档:**
|
|
239
397
|
${this.formatReferenceList(linkedKnowledgeDocs, '待补充')}
|
|
240
398
|
|
|
241
399
|
## Review Checklist
|
|
@@ -289,11 +447,79 @@ ${this.formatReferenceList(linkedKnowledgeDocs, 'TBD')}
|
|
|
289
447
|
- [ ] Continue implementation
|
|
290
448
|
- [ ] Require follow-up changes
|
|
291
449
|
- [ ] Ready for verification / archive`;
|
|
450
|
+
const ja = `## レビュー範囲
|
|
451
|
+
|
|
452
|
+
- Change: \`${context.feature}\`
|
|
453
|
+
- Mode: \`${context.mode}\`
|
|
454
|
+
- Affects: ${affectsJa}
|
|
455
|
+
|
|
456
|
+
## 参照コンテキスト
|
|
457
|
+
|
|
458
|
+
**プロジェクト文書:**
|
|
459
|
+
${this.formatReferenceList(projectDocs, '未定')}
|
|
460
|
+
|
|
461
|
+
**モジュール SKILL:**
|
|
462
|
+
${this.formatReferenceList(moduleSkills, '未定')}
|
|
463
|
+
|
|
464
|
+
**API / 設計 / 計画文書:**
|
|
465
|
+
${this.formatReferenceList(linkedKnowledgeDocs, '未定')}
|
|
466
|
+
|
|
467
|
+
## レビューチェックリスト
|
|
468
|
+
|
|
469
|
+
- [ ] 実装が proposal の背景、目標、範囲に一致している
|
|
470
|
+
- [ ] 関連モジュールの SKILL が更新されている
|
|
471
|
+
- [ ] API / 設計 / 計画文書が揃っている
|
|
472
|
+
- [ ] 検証が主要リスクをカバーしている
|
|
473
|
+
- [ ] リグレッション、境界漏れ、未解決事項が追跡されている
|
|
474
|
+
|
|
475
|
+
## 指摘事項
|
|
476
|
+
|
|
477
|
+
- [ ] 未定
|
|
478
|
+
|
|
479
|
+
## 判定
|
|
480
|
+
|
|
481
|
+
- [ ] 実装を継続できる
|
|
482
|
+
- [ ] 追補修正が必要
|
|
483
|
+
- [ ] 検証 / archive に進める`;
|
|
484
|
+
const ar = `## نطاق المراجعة
|
|
485
|
+
|
|
486
|
+
- Change: \`${context.feature}\`
|
|
487
|
+
- Mode: \`${context.mode}\`
|
|
488
|
+
- Affects: ${affectsAr}
|
|
489
|
+
|
|
490
|
+
## مراجع السياق
|
|
491
|
+
|
|
492
|
+
**وثائق المشروع:**
|
|
493
|
+
${this.formatReferenceList(projectDocs, 'قيد التحديد')}
|
|
494
|
+
|
|
495
|
+
**ملفات SKILL للوحدات:**
|
|
496
|
+
${this.formatReferenceList(moduleSkills, 'قيد التحديد')}
|
|
497
|
+
|
|
498
|
+
**وثائق API / التصميم / التخطيط:**
|
|
499
|
+
${this.formatReferenceList(linkedKnowledgeDocs, 'قيد التحديد')}
|
|
500
|
+
|
|
501
|
+
## قائمة فحص المراجعة
|
|
502
|
+
|
|
503
|
+
- [ ] التنفيذ يطابق الخلفية والأهداف والنطاق في proposal
|
|
504
|
+
- [ ] تم تحديث ملفات SKILL ذات الصلة
|
|
505
|
+
- [ ] وثائق API / التصميم / التخطيط متوافقة
|
|
506
|
+
- [ ] يغطي التحقق المخاطر الرئيسية
|
|
507
|
+
- [ ] تم تتبع الارتدادات والثغرات والأسئلة المفتوحة
|
|
508
|
+
|
|
509
|
+
## الملاحظات
|
|
510
|
+
|
|
511
|
+
- [ ] قيد التحديد
|
|
512
|
+
|
|
513
|
+
## القرار
|
|
514
|
+
|
|
515
|
+
- [ ] يمكن متابعة التنفيذ
|
|
516
|
+
- [ ] يلزم إجراء تعديلات إضافية
|
|
517
|
+
- [ ] جاهز للانتقال إلى التحقق / الأرشفة`;
|
|
292
518
|
return this.withFrontmatter({
|
|
293
519
|
feature: context.feature,
|
|
294
520
|
created,
|
|
295
521
|
status: 'pending_review',
|
|
296
|
-
}, this.copy(context.documentLanguage, zh, en));
|
|
522
|
+
}, this.copy(context.documentLanguage, zh, en, ja, ar));
|
|
297
523
|
}
|
|
298
524
|
}
|
|
299
525
|
exports.ExecutionTemplateBuilder = ExecutionTemplateBuilder;
|