@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
@@ -3,7 +3,7 @@ type FrontmatterValue = string | number | boolean | string[];
3
3
  export declare abstract class TemplateBuilderBase {
4
4
  protected getCurrentDate(): string;
5
5
  protected isEnglish(language: TemplateDocumentLanguage): boolean;
6
- protected copy(language: TemplateDocumentLanguage, zh: string, en: string): string;
6
+ protected copy(language: TemplateDocumentLanguage, zh: string, en: string, ja?: string, ar?: string): string;
7
7
  protected formatList(items: string[], emptyFallback: string): string;
8
8
  protected formatChecklist(items: string[], emptyFallback: string): string;
9
9
  protected formatLinkedList(items: Array<{
@@ -16,4 +16,4 @@ export declare abstract class TemplateBuilderBase {
16
16
  private toYamlValue;
17
17
  }
18
18
  export {};
19
- //# sourceMappingURL=TemplateBuilderBase.d.ts.map
19
+ //# sourceMappingURL=TemplateBuilderBase.d.ts.map
@@ -8,8 +8,17 @@ class TemplateBuilderBase {
8
8
  isEnglish(language) {
9
9
  return language === 'en-US';
10
10
  }
11
- copy(language, zh, en) {
12
- return this.isEnglish(language) ? en : zh;
11
+ copy(language, zh, en, ja = en, ar = en) {
12
+ if (language === 'zh-CN') {
13
+ return zh;
14
+ }
15
+ if (language === 'ja-JP') {
16
+ return ja;
17
+ }
18
+ if (language === 'ar') {
19
+ return ar;
20
+ }
21
+ return en;
13
22
  }
14
23
  formatList(items, emptyFallback) {
15
24
  const normalized = items.map(item => item.trim()).filter(Boolean);
@@ -57,4 +66,4 @@ class TemplateBuilderBase {
57
66
  }
58
67
  }
59
68
  exports.TemplateBuilderBase = TemplateBuilderBase;
60
- //# sourceMappingURL=TemplateBuilderBase.js.map
69
+ //# sourceMappingURL=TemplateBuilderBase.js.map
@@ -4,14 +4,8 @@ exports.TemplateInputFactory = void 0;
4
4
  const constants_1 = require("../../core/constants");
5
5
  class TemplateInputFactory {
6
6
  normalizeFeatureTemplateInput(input) {
7
- const englishDefaults = {
8
- background: 'Why is this change needed? What problem exists today?',
9
- goals: ['What problem is solved after this change? What do users or developers gain?'],
10
- inScope: ['TBD'],
11
- outOfScope: ['TBD'],
12
- acceptanceCriteria: ['Acceptance item 1', 'Acceptance item 2'],
13
- };
14
7
  if (typeof input === 'string') {
8
+ const englishDefaults = this.getFeatureDefaults('en-US');
15
9
  return {
16
10
  feature: input,
17
11
  mode: 'standard',
@@ -19,16 +13,17 @@ class TemplateInputFactory {
19
13
  affects: [],
20
14
  flags: [],
21
15
  optionalSteps: [],
22
- background: '为什么要做这个 change?当前存在哪些问题?',
23
- goals: ['做完之后能解决什么问题?用户或开发者能得到什么?'],
24
- inScope: ['待补充'],
25
- outOfScope: ['待补充'],
26
- acceptanceCriteria: ['条件一', '条件二'],
16
+ background: englishDefaults.background,
17
+ goals: [...englishDefaults.goals],
18
+ inScope: [...englishDefaults.inScope],
19
+ outOfScope: [...englishDefaults.outOfScope],
20
+ acceptanceCriteria: [...englishDefaults.acceptanceCriteria],
27
21
  projectContext: this.normalizeFeatureProjectContext(),
28
- documentLanguage: 'zh-CN',
22
+ documentLanguage: 'en-US',
29
23
  };
30
24
  }
31
25
  const documentLanguage = this.normalizeDocumentLanguage(input.documentLanguage);
26
+ const localizedDefaults = this.getFeatureDefaults(documentLanguage);
32
27
  const normalized = {
33
28
  feature: input.feature,
34
29
  mode: input.mode ?? 'standard',
@@ -36,35 +31,28 @@ class TemplateInputFactory {
36
31
  affects: input.affects ?? [],
37
32
  flags: input.flags ?? [],
38
33
  optionalSteps: input.optionalSteps ?? [],
39
- background: input.background?.trim() || '为什么要做这个 change?当前存在哪些问题?',
40
- goals: input.goals?.map(item => item.trim()).filter(Boolean) ?? [
41
- '做完之后能解决什么问题?用户或开发者能得到什么?',
42
- ],
43
- inScope: input.inScope?.map(item => item.trim()).filter(Boolean) ?? ['待补充'],
44
- outOfScope: input.outOfScope?.map(item => item.trim()).filter(Boolean) ?? ['待补充'],
45
- acceptanceCriteria: input.acceptanceCriteria?.map(item => item.trim()).filter(Boolean) ?? [
46
- '条件一',
47
- '条件二',
48
- ],
34
+ background: input.background?.trim() || localizedDefaults.background,
35
+ goals: input.goals?.map(item => item.trim()).filter(Boolean) ?? [...localizedDefaults.goals],
36
+ inScope: input.inScope?.map(item => item.trim()).filter(Boolean) ?? [...localizedDefaults.inScope],
37
+ outOfScope: input.outOfScope?.map(item => item.trim()).filter(Boolean) ?? [...localizedDefaults.outOfScope],
38
+ acceptanceCriteria: input.acceptanceCriteria?.map(item => item.trim()).filter(Boolean) ?? [...localizedDefaults.acceptanceCriteria],
49
39
  projectContext: this.normalizeFeatureProjectContext(input.projectContext),
50
40
  documentLanguage,
51
41
  };
52
- if (documentLanguage === 'en-US') {
53
- if (!input.background?.trim()) {
54
- normalized.background = englishDefaults.background;
55
- }
56
- if (!input.goals?.some(item => item.trim().length > 0)) {
57
- normalized.goals = [...englishDefaults.goals];
58
- }
59
- if (!input.inScope?.some(item => item.trim().length > 0)) {
60
- normalized.inScope = [...englishDefaults.inScope];
61
- }
62
- if (!input.outOfScope?.some(item => item.trim().length > 0)) {
63
- normalized.outOfScope = [...englishDefaults.outOfScope];
64
- }
65
- if (!input.acceptanceCriteria?.some(item => item.trim().length > 0)) {
66
- normalized.acceptanceCriteria = [...englishDefaults.acceptanceCriteria];
67
- }
42
+ if (!input.background?.trim()) {
43
+ normalized.background = localizedDefaults.background;
44
+ }
45
+ if (!input.goals?.some(item => item.trim().length > 0)) {
46
+ normalized.goals = [...localizedDefaults.goals];
47
+ }
48
+ if (!input.inScope?.some(item => item.trim().length > 0)) {
49
+ normalized.inScope = [...localizedDefaults.inScope];
50
+ }
51
+ if (!input.outOfScope?.some(item => item.trim().length > 0)) {
52
+ normalized.outOfScope = [...localizedDefaults.outOfScope];
53
+ }
54
+ if (!input.acceptanceCriteria?.some(item => item.trim().length > 0)) {
55
+ normalized.acceptanceCriteria = [...localizedDefaults.acceptanceCriteria];
68
56
  }
69
57
  return normalized;
70
58
  }
@@ -90,13 +78,10 @@ class TemplateInputFactory {
90
78
  const presetSummary = presetDefaults?.summary?.trim();
91
79
  const presetArchitecture = presetDefaults?.architecture?.trim();
92
80
  const documentLanguage = this.normalizeDocumentLanguage(input?.documentLanguage);
93
- const placeholderText = documentLanguage === 'en-US' ? 'TBD' : '待补充';
94
- const defaultSummary = documentLanguage === 'en-US'
95
- ? `${fallbackName} has been initialized with OSpec and is ready for change-based delivery. Fill in the missing project context as the repository becomes clearer.`
96
- : `${fallbackName} 已通过 OSpec 初始化,当前已具备按 change 推进交付的基础条件。请继续补充缺失的项目上下文。`;
97
- const defaultArchitecture = documentLanguage === 'en-US'
98
- ? 'OSpec initialized the protocol shell and baseline project knowledge docs. Refine the architecture details as the repository direction becomes clearer.'
99
- : 'OSpec 已初始化协议壳和基础项目知识文档,后续可结合仓库实际方向继续细化架构。';
81
+ const localizedBootstrapDefaults = this.getBootstrapDefaults(documentLanguage, fallbackName);
82
+ const placeholderText = localizedBootstrapDefaults.placeholder;
83
+ const defaultSummary = localizedBootstrapDefaults.summary;
84
+ const defaultArchitecture = localizedBootstrapDefaults.architecture;
100
85
  const projectName = normalizedInputProjectName || fallbackName;
101
86
  const summary = normalizedInputSummary ||
102
87
  presetSummary ||
@@ -228,7 +213,10 @@ class TemplateInputFactory {
228
213
  };
229
214
  }
230
215
  normalizeDocumentLanguage(input) {
231
- return input === 'en-US' ? 'en-US' : 'zh-CN';
216
+ if (input === 'zh-CN' || input === 'en-US' || input === 'ja-JP' || input === 'ar') {
217
+ return input;
218
+ }
219
+ return 'en-US';
232
220
  }
233
221
  pickFieldKeys(fieldSources, source) {
234
222
  return Object.entries(fieldSources)
@@ -239,11 +227,78 @@ class TemplateInputFactory {
239
227
  const normalized = value.trim().toLowerCase();
240
228
  return (normalized.length === 0 ||
241
229
  normalized === '待补充' ||
230
+ normalized === '未定' ||
231
+ normalized === 'قيد التحديد' ||
232
+ normalized === 'سيتم تحديده' ||
242
233
  normalized === 'todo' ||
243
234
  normalized === 'tbd' ||
244
235
  normalized.includes('<') ||
245
236
  normalized.includes('>'));
246
237
  }
238
+ getFeatureDefaults(documentLanguage) {
239
+ switch (documentLanguage) {
240
+ case 'zh-CN':
241
+ return {
242
+ background: '为什么要做这个 change?当前存在哪些问题?',
243
+ goals: ['做完之后能解决什么问题?用户或开发者能得到什么?'],
244
+ inScope: ['待补充'],
245
+ outOfScope: ['待补充'],
246
+ acceptanceCriteria: ['条件一', '条件二'],
247
+ };
248
+ case 'ja-JP':
249
+ return {
250
+ background: 'なぜこの change が必要ですか。現在どのような問題がありますか。',
251
+ goals: ['この change の完了後に何が解決され、ユーザーや開発者は何を得られますか。'],
252
+ inScope: ['未定'],
253
+ outOfScope: ['未定'],
254
+ acceptanceCriteria: ['受け入れ条件 1', '受け入れ条件 2'],
255
+ };
256
+ case 'ar':
257
+ return {
258
+ background: 'لماذا نحتاج إلى هذا التغيير؟ ما المشكلة الموجودة حالياً؟',
259
+ goals: ['ما المشكلة التي ستُحل بعد هذا التغيير؟ وما الفائدة للمستخدمين أو للمطورين؟'],
260
+ inScope: ['قيد التحديد'],
261
+ outOfScope: ['قيد التحديد'],
262
+ acceptanceCriteria: ['معيار قبول 1', 'معيار قبول 2'],
263
+ };
264
+ default:
265
+ return {
266
+ background: 'Why is this change needed? What problem exists today?',
267
+ goals: ['What problem is solved after this change? What do users or developers gain?'],
268
+ inScope: ['TBD'],
269
+ outOfScope: ['TBD'],
270
+ acceptanceCriteria: ['Acceptance item 1', 'Acceptance item 2'],
271
+ };
272
+ }
273
+ }
274
+ getBootstrapDefaults(documentLanguage, fallbackName) {
275
+ switch (documentLanguage) {
276
+ case 'zh-CN':
277
+ return {
278
+ placeholder: '待补充',
279
+ summary: `${fallbackName} 已通过 OSpec 初始化,当前已具备按 change 推进交付的基础条件。请继续补充缺失的项目上下文。`,
280
+ architecture: 'OSpec 已初始化协议壳和基础项目知识文档,后续可结合仓库实际方向继续细化架构。',
281
+ };
282
+ case 'ja-JP':
283
+ return {
284
+ placeholder: '未定',
285
+ summary: `${fallbackName} は OSpec によって初期化され、change ベースで進めるための基本状態が整いました。リポジトリの方向性が明確になるにつれて不足しているプロジェクト文脈を補ってください。`,
286
+ architecture: 'OSpec はプロトコルシェルと基本的なプロジェクト知識ドキュメントを初期化しました。リポジトリの方向性が明確になるにつれて、アーキテクチャ詳細を調整してください。',
287
+ };
288
+ case 'ar':
289
+ return {
290
+ placeholder: 'قيد التحديد',
291
+ summary: `تمت تهيئة ${fallbackName} بواسطة OSpec وأصبح جاهزاً مبدئياً للتسليم المعتمد على changes. أكمل سياق المشروع الناقص كلما أصبحت صورة المستودع أوضح.`,
292
+ architecture: 'قام OSpec بتهيئة غلاف البروتوكول ووثائق معرفة المشروع الأساسية. حسّن تفاصيل المعمارية مع اتضاح اتجاه المستودع.',
293
+ };
294
+ default:
295
+ return {
296
+ placeholder: 'TBD',
297
+ summary: `${fallbackName} has been initialized with OSpec and is ready for change-based delivery. Fill in the missing project context as the repository becomes clearer.`,
298
+ architecture: 'OSpec initialized the protocol shell and baseline project knowledge docs. Refine the architecture details as the repository direction becomes clearer.',
299
+ };
300
+ }
301
+ }
247
302
  slugify(value) {
248
303
  return value
249
304
  .toLowerCase()
@@ -1,6 +1,6 @@
1
1
  import { ProjectMode } from '../../core/types';
2
2
  import { ProjectPresetId } from '../../presets/ProjectPresets';
3
- export type TemplateDocumentLanguage = 'zh-CN' | 'en-US';
3
+ export type TemplateDocumentLanguage = 'zh-CN' | 'en-US' | 'ja-JP' | 'ar';
4
4
  export interface FeatureTemplateInput {
5
5
  feature: string;
6
6
  mode?: ProjectMode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawplays/ospec-cli",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "CLI tool for enforcing ospec workflow",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -47,8 +47,11 @@
47
47
  "files": [
48
48
  "dist/**",
49
49
  "assets/**",
50
+ "agents/openai.yaml",
50
51
  "scripts/postinstall.js",
51
52
  ".ospec/templates/hooks/**",
53
+ "SKILL.md",
54
+ "skill.yaml",
52
55
  "README.md",
53
56
  "README.zh-CN.md",
54
57
  "LICENSE"
package/skill.yaml ADDED
@@ -0,0 +1,151 @@
1
+ name: ospec
2
+ title: OSpec
3
+ description: Document-driven OSpec workflow skill for AI-assisted development with Codex, Claude Code, and similar AI tools.
4
+ version: 5.1.0
5
+ author: OSpec Team
6
+ license: MIT
7
+
8
+ interface:
9
+ display_name: "OSpec"
10
+ short_description: "Inspect, initialize, and operate OSpec projects"
11
+ default_prompt: "Use $ospec to initialize this directory according to OSpec rules: use ospec init so the repository ends in change-ready state, reuse existing project docs when available, ask one concise follow-up for missing summary or tech stack in AI-assisted flows, fall back to placeholder docs when the user skips that context, do not assume a web template when the project type is unclear, and do not create the first change automatically."
12
+
13
+ requires_local:
14
+ node: ">=18.0.0"
15
+ npm: ">=8.0.0"
16
+
17
+ protocol:
18
+ project_files:
19
+ - ".skillrc"
20
+ - "SKILL.md"
21
+ - "SKILL.index.json"
22
+ - "build-index-auto.cjs"
23
+ - "for-ai/ai-guide.md"
24
+ - "for-ai/execution-protocol.md"
25
+ - "for-ai/naming-conventions.md"
26
+ - "for-ai/skill-conventions.md"
27
+ - "for-ai/workflow-conventions.md"
28
+ - "for-ai/development-guide.md"
29
+ feature_files:
30
+ - "changes/active/<feature>/proposal.md"
31
+ - "changes/active/<feature>/tasks.md"
32
+ - "changes/active/<feature>/state.json"
33
+ - "changes/active/<feature>/verification.md"
34
+ feature_name_format: "kebab-case"
35
+
36
+ commands:
37
+ - id: status
38
+ command: "ospec status [project-dir]"
39
+ purpose: "Show project knowledge, execution status, and the recommended next step."
40
+ - id: init
41
+ command: "ospec init [root-dir]"
42
+ purpose: "Initialize the repository to a change-ready state from CLI."
43
+ - id: docs_generate
44
+ command: "ospec docs generate [project-dir]"
45
+ purpose: "Refresh, repair, or backfill the project knowledge layer for an already initialized repository."
46
+ - id: new
47
+ command: "ospec new <feature-name> [root-dir]"
48
+ purpose: "Create a new change under changes/active with proposal/tasks/state/verification/review."
49
+ - id: changes_status
50
+ command: "ospec changes status [project-dir]"
51
+ purpose: "Show PASS/WARN/FAIL protocol status for every active change."
52
+ - id: docs_status
53
+ command: "ospec docs status [project-dir]"
54
+ purpose: "Show project-doc coverage and missing knowledge docs."
55
+ - id: skills_status
56
+ command: "ospec skills status [project-dir]"
57
+ purpose: "Show layered SKILL coverage, module skills, and index status."
58
+ - id: index_check
59
+ command: "ospec index check [project-dir]"
60
+ purpose: "Show whether the skill index exists, is stale, or needs rebuild."
61
+ - id: index_build
62
+ command: "ospec index build [project-dir]"
63
+ purpose: "Rebuild the project skill index."
64
+ - id: progress
65
+ command: "ospec progress [changes/active/<feature>]"
66
+ purpose: "Show progress for a single active feature."
67
+ - id: verify
68
+ command: "ospec verify [changes/active/<feature>]"
69
+ purpose: "Check protocol completeness and optional-step coverage."
70
+ - id: archive
71
+ command: "ospec archive [changes/active/<feature>] [--check]"
72
+ purpose: "Archive a completed change after gate checks; use --check for readiness only."
73
+ - id: finalize
74
+ command: "ospec finalize [changes/active/<feature>]"
75
+ purpose: "Run verify + index refresh + archive as the standard closeout flow before commit."
76
+ - id: workflow_show
77
+ command: "ospec workflow show"
78
+ purpose: "Show workflow configuration for the current project."
79
+ - id: workflow_flags
80
+ command: "ospec workflow list-flags"
81
+ purpose: "List supported workflow feature flags."
82
+ - id: skill_status
83
+ command: "ospec skill status"
84
+ purpose: "Check whether a Codex-installed OSpec skill is present and in sync. Managed defaults are ospec and ospec-change."
85
+ - id: skill_install
86
+ command: "ospec skill install"
87
+ purpose: "Install or sync one OSpec skill package into ~/.codex/skills/. Managed defaults are ospec and ospec-change."
88
+ - id: skill_status_claude
89
+ command: "ospec skill status-claude"
90
+ purpose: "Check whether a Claude Code-installed OSpec skill is present and in sync. Managed defaults are ospec and ospec-change."
91
+ - id: skill_install_claude
92
+ command: "ospec skill install-claude"
93
+ purpose: "Install or sync one OSpec skill package into ~/.claude/skills/. Managed defaults are ospec and ospec-change."
94
+
95
+ workflow:
96
+ read_order:
97
+ - ".skillrc"
98
+ - "changes/active/<feature>/proposal.md"
99
+ - "changes/active/<feature>/tasks.md"
100
+ - "changes/active/<feature>/state.json"
101
+ - "changes/active/<feature>/verification.md"
102
+ archive_requirements:
103
+ - "state.json.status must be ready_to_archive"
104
+ - "verification.md must be fully passed"
105
+ - "activated optional steps must appear in tasks.md and verification.md"
106
+ - "activated optional steps must be listed in verification.md.passed_optional_steps"
107
+ preferred_entry:
108
+ - "Run ospec init [path] when the directory is uninitialized or not yet change-ready."
109
+ - "Pass --summary, --tech-stack, or --architecture during init when CLI users already know the missing project context."
110
+ - "Run your project deployment and validation flow before archiving the active change."
111
+ - "Run ospec verify [changes/active/<change>] before archiving."
112
+ - "Use ospec status [path] when you want an explicit textual summary or troubleshooting snapshot."
113
+ - "Run ospec docs generate [path] later when you only need a docs maintenance pass."
114
+ - "Create the first change explicitly instead of assuming initialization will do it."
115
+
116
+ guardrails:
117
+ - "Treat init as change-ready initialization, not protocol-shell-only initialization."
118
+ - "If the user intent is simply to initialize the project or current directory, still trigger the mandatory init flow without asking for a longer prompt."
119
+ - "When the user asks to initialize, use ospec init to take the repository to change-ready state and verify the managed protocol-shell files plus docs/project/* on disk before declaring success."
120
+ - "In AI-assisted flows, ask at most one concise follow-up for missing summary or tech stack before init when that context is unavailable."
121
+ - "If the user declines or no AI follow-up is possible, continue with placeholder docs instead of blocking init."
122
+ - "Do not assume the project is a web or Next.js project unless the repository or user makes that explicit."
123
+ - "Do not apply business scaffold during plain init."
124
+ - "Do not generate docs/project/bootstrap-summary.md during plain init or docs generate."
125
+ - "Do not create the first change automatically unless the user explicitly asks for a change."
126
+ - "Treat presets as planning defaults, not as init-time templates."
127
+
128
+ prompt_profiles:
129
+ minimal: "Initialize this project with ospec. Use ospec init and verify the managed files before saying it is initialized."
130
+ standard: "Initialize this project with ospec according to current OSpec rules. Use ospec init so the repository ends in change-ready state, and do not create the first change automatically."
131
+ guided_init: "Use ospec to initialize this project. If the repository lacks project context, ask me for a short summary or tech stack first. If I skip it, continue with placeholder docs."
132
+ knowledge_backfill: "Use ospec to refresh or repair the project knowledge layer for this directory. Focus on docs, layered skills, and index state. Do not create a change yet."
133
+ change_creation: "Use ospec to create and advance a change for this requirement. Respect the current project state and do not treat init as auto-change creation."
134
+
135
+ usage:
136
+ new_project_flow:
137
+ - "Initialize the repository with ospec init [path]."
138
+ - "If AI can ask follow-up questions and project context is missing, provide a short summary or tech stack once, or skip it and let placeholder docs be generated."
139
+ - "Create the first active change explicitly."
140
+ - "Run your project deployment and validation flow, then use ospec verify [changes/active/<change>]."
141
+ - "Archive the validated change with ospec finalize [changes/active/<change>]."
142
+ - "Verify .skillrc, changes/, .ospec/, build-index-auto.cjs, for-ai docs, and docs/project/* before claiming init is complete."
143
+ - "Use presets only as planning defaults; scaffold still requires explicit intent."
144
+ prompt_shortcuts:
145
+ - "initialize this project"
146
+ - "initialize this directory"
147
+ - "initialize the current project"
148
+ - "使用 ospec 初始化项目"
149
+ - "使用 ospec 初始化这个目录"
150
+ - "use ospec to initialize this directory"
151
+ - "use ospec to refresh or repair the project knowledge layer"