@clawplays/ospec-cli 0.3.7 → 0.3.9

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 (166) hide show
  1. package/README.md +9 -1
  2. package/SKILL.md +1 -1
  3. package/assets/git-hooks/post-merge +4 -2
  4. package/assets/git-hooks/pre-commit +4 -2
  5. package/dist/advanced/BatchOperations.d.ts +1 -2
  6. package/dist/advanced/BatchOperations.js +1 -2
  7. package/dist/advanced/CachingLayer.d.ts +1 -2
  8. package/dist/advanced/CachingLayer.js +1 -2
  9. package/dist/advanced/FeatureUpdater.d.ts +1 -2
  10. package/dist/advanced/FeatureUpdater.js +1 -2
  11. package/dist/advanced/PerformanceMonitor.d.ts +1 -2
  12. package/dist/advanced/PerformanceMonitor.js +1 -2
  13. package/dist/advanced/StatePersistence.d.ts +1 -2
  14. package/dist/advanced/StatePersistence.js +1 -2
  15. package/dist/advanced/index.d.ts +1 -2
  16. package/dist/advanced/index.js +1 -2
  17. package/dist/cli/commands/config.d.ts +1 -2
  18. package/dist/cli/commands/config.js +1 -2
  19. package/dist/cli/commands/feature.d.ts +1 -2
  20. package/dist/cli/commands/feature.js +1 -2
  21. package/dist/cli/commands/index.d.ts +1 -2
  22. package/dist/cli/commands/index.js +1 -2
  23. package/dist/cli/commands/project.d.ts +1 -2
  24. package/dist/cli/commands/project.js +1 -2
  25. package/dist/cli/commands/validate.d.ts +1 -2
  26. package/dist/cli/commands/validate.js +1 -2
  27. package/dist/cli/index.d.ts +1 -2
  28. package/dist/cli/index.js +1 -2
  29. package/dist/cli.d.ts +1 -2
  30. package/dist/cli.js +1 -2
  31. package/dist/commands/ArchiveCommand.d.ts +1 -2
  32. package/dist/commands/ArchiveCommand.js +1 -1
  33. package/dist/commands/BaseCommand.d.ts +1 -2
  34. package/dist/commands/BaseCommand.js +1 -2
  35. package/dist/commands/BatchCommand.d.ts +1 -2
  36. package/dist/commands/BatchCommand.js +1 -2
  37. package/dist/commands/ChangesCommand.js +0 -1
  38. package/dist/commands/DocsCommand.d.ts +1 -2
  39. package/dist/commands/DocsCommand.js +0 -1
  40. package/dist/commands/IndexCommand.d.ts +1 -2
  41. package/dist/commands/IndexCommand.js +1 -2
  42. package/dist/commands/InitCommand.d.ts +1 -2
  43. package/dist/commands/InitCommand.js +0 -1
  44. package/dist/commands/NewCommand.d.ts +0 -1
  45. package/dist/commands/NewCommand.js +19 -12
  46. package/dist/commands/PluginsCommand.d.ts +0 -1
  47. package/dist/commands/PluginsCommand.js +0 -1
  48. package/dist/commands/ProgressCommand.d.ts +1 -2
  49. package/dist/commands/ProgressCommand.js +1 -2
  50. package/dist/commands/QueueCommand.d.ts +0 -1
  51. package/dist/commands/QueueCommand.js +0 -1
  52. package/dist/commands/RunCommand.d.ts +0 -1
  53. package/dist/commands/RunCommand.js +0 -1
  54. package/dist/commands/SkillCommand.d.ts +0 -1
  55. package/dist/commands/SkillCommand.js +1 -2
  56. package/dist/commands/SkillsCommand.d.ts +1 -2
  57. package/dist/commands/SkillsCommand.js +1 -2
  58. package/dist/commands/StatusCommand.d.ts +1 -2
  59. package/dist/commands/StatusCommand.js +0 -1
  60. package/dist/commands/UpdateCommand.d.ts +0 -1
  61. package/dist/commands/UpdateCommand.js +37 -2
  62. package/dist/commands/VerifyCommand.d.ts +1 -2
  63. package/dist/commands/VerifyCommand.js +4 -41
  64. package/dist/commands/WorkflowCommand.d.ts +0 -1
  65. package/dist/commands/WorkflowCommand.js +0 -1
  66. package/dist/commands/index.d.ts +0 -1
  67. package/dist/commands/index.js +0 -1
  68. package/dist/core/constants.d.ts +1 -2
  69. package/dist/core/constants.js +1 -2
  70. package/dist/core/errors.d.ts +1 -2
  71. package/dist/core/errors.js +1 -2
  72. package/dist/core/index.d.ts +1 -2
  73. package/dist/core/index.js +1 -2
  74. package/dist/core/types.d.ts +0 -1
  75. package/dist/core/types.js +1 -2
  76. package/dist/index.d.ts +1 -2
  77. package/dist/index.js +1 -2
  78. package/dist/presets/ProjectPresets.d.ts +0 -1
  79. package/dist/presets/ProjectPresets.js +0 -1
  80. package/dist/scaffolds/ProjectScaffoldPresets.d.ts +1 -2
  81. package/dist/scaffolds/ProjectScaffoldPresets.js +1 -2
  82. package/dist/services/ConfigManager.d.ts +1 -2
  83. package/dist/services/ConfigManager.js +0 -1
  84. package/dist/services/FeatureManager.d.ts +1 -2
  85. package/dist/services/FeatureManager.js +1 -2
  86. package/dist/services/FileService.d.ts +1 -2
  87. package/dist/services/FileService.js +0 -1
  88. package/dist/services/IndexBuilder.d.ts +1 -2
  89. package/dist/services/IndexBuilder.js +1 -2
  90. package/dist/services/Logger.d.ts +1 -2
  91. package/dist/services/Logger.js +1 -2
  92. package/dist/services/ProjectAssetRegistry.d.ts +0 -1
  93. package/dist/services/ProjectAssetRegistry.js +1 -2
  94. package/dist/services/ProjectAssetService.d.ts +0 -1
  95. package/dist/services/ProjectAssetService.js +4 -2
  96. package/dist/services/ProjectScaffoldCommandService.d.ts +1 -2
  97. package/dist/services/ProjectScaffoldCommandService.js +0 -1
  98. package/dist/services/ProjectScaffoldService.d.ts +1 -2
  99. package/dist/services/ProjectScaffoldService.js +0 -1
  100. package/dist/services/ProjectService.d.ts +1 -1
  101. package/dist/services/ProjectService.js +267 -411
  102. package/dist/services/QueueService.d.ts +0 -1
  103. package/dist/services/QueueService.js +1 -1
  104. package/dist/services/RunService.d.ts +0 -1
  105. package/dist/services/RunService.js +0 -1
  106. package/dist/services/SkillParser.d.ts +1 -2
  107. package/dist/services/SkillParser.js +0 -1
  108. package/dist/services/StateManager.d.ts +0 -1
  109. package/dist/services/StateManager.js +0 -1
  110. package/dist/services/TemplateEngine.d.ts +1 -2
  111. package/dist/services/TemplateEngine.js +1 -2
  112. package/dist/services/TemplateGenerator.d.ts +1 -2
  113. package/dist/services/TemplateGenerator.js +6 -7
  114. package/dist/services/ValidationService.d.ts +1 -2
  115. package/dist/services/ValidationService.js +1 -2
  116. package/dist/services/Validator.d.ts +1 -2
  117. package/dist/services/Validator.js +1 -2
  118. package/dist/services/index.d.ts +0 -1
  119. package/dist/services/index.js +0 -1
  120. package/dist/services/templates/ExecutionTemplateBuilder.d.ts +1 -2
  121. package/dist/services/templates/ExecutionTemplateBuilder.js +52 -29
  122. package/dist/services/templates/ProjectTemplateBuilder.d.ts +1 -2
  123. package/dist/services/templates/ProjectTemplateBuilder.js +0 -1
  124. package/dist/services/templates/TemplateBuilderBase.d.ts +5 -1
  125. package/dist/services/templates/TemplateBuilderBase.js +31 -3
  126. package/dist/services/templates/TemplateInputFactory.d.ts +1 -2
  127. package/dist/services/templates/TemplateInputFactory.js +4 -1
  128. package/dist/services/templates/templateTypes.d.ts +4 -1
  129. package/dist/services/templates/templateTypes.js +1 -2
  130. package/dist/tools/build-index.js +128 -36
  131. package/dist/utils/DateUtils.d.ts +1 -2
  132. package/dist/utils/DateUtils.js +1 -2
  133. package/dist/utils/PathUtils.d.ts +0 -1
  134. package/dist/utils/PathUtils.js +0 -1
  135. package/dist/utils/StringUtils.d.ts +1 -2
  136. package/dist/utils/StringUtils.js +1 -2
  137. package/dist/utils/helpers.d.ts +0 -1
  138. package/dist/utils/helpers.js +0 -1
  139. package/dist/utils/index.d.ts +1 -2
  140. package/dist/utils/index.js +1 -2
  141. package/dist/utils/logger.d.ts +1 -2
  142. package/dist/utils/logger.js +1 -2
  143. package/dist/utils/path.d.ts +1 -2
  144. package/dist/utils/path.js +1 -2
  145. package/dist/utils/subcommandHelp.d.ts +0 -1
  146. package/dist/utils/subcommandHelp.js +0 -1
  147. package/dist/workflow/ArchiveGate.d.ts +1 -2
  148. package/dist/workflow/ArchiveGate.js +1 -2
  149. package/dist/workflow/ConfigurableWorkflow.d.ts +1 -2
  150. package/dist/workflow/ConfigurableWorkflow.js +1 -2
  151. package/dist/workflow/HookSystem.d.ts +1 -2
  152. package/dist/workflow/HookSystem.js +1 -2
  153. package/dist/workflow/IndexRegenerator.d.ts +1 -2
  154. package/dist/workflow/IndexRegenerator.js +1 -2
  155. package/dist/workflow/PluginWorkflowComposer.d.ts +0 -1
  156. package/dist/workflow/PluginWorkflowComposer.js +0 -1
  157. package/dist/workflow/SkillUpdateEngine.d.ts +1 -2
  158. package/dist/workflow/SkillUpdateEngine.js +1 -2
  159. package/dist/workflow/VerificationSystem.d.ts +1 -2
  160. package/dist/workflow/VerificationSystem.js +1 -2
  161. package/dist/workflow/WorkflowEngine.d.ts +1 -2
  162. package/dist/workflow/WorkflowEngine.js +1 -2
  163. package/dist/workflow/index.d.ts +0 -1
  164. package/dist/workflow/index.js +0 -1
  165. package/package.json +17 -8
  166. package/skill.yaml +2 -2
@@ -4,6 +4,7 @@ const fs = require('fs');
4
4
  const fsp = require('fs/promises');
5
5
  const path = require('path');
6
6
  const { spawnSync } = require('child_process');
7
+ const matter = require('gray-matter');
7
8
 
8
9
  const SKIP_DIRS = new Set(['node_modules', 'dist', '.git', 'changes', 'for-ai']);
9
10
  const INDEX_FILE = 'SKILL.index.json';
@@ -64,7 +65,7 @@ async function runHookCheck(rootDir, event) {
64
65
  const indexStatus = await computeIndexStatus(rootDir);
65
66
  if (indexStatus.stale) {
66
67
  console.log('[ospec] SKILL.index.json is stale');
67
- console.log('[ospec] run "ospec index build" or "node build-index-auto.cjs" to refresh it');
68
+ console.log('[ospec] run "ospec index build" or "node .ospec/tools/build-index-auto.cjs" to refresh it');
68
69
  if (event === 'pre-commit' && config.indexCheck === 'error') {
69
70
  shouldBlock = true;
70
71
  }
@@ -282,46 +283,31 @@ async function buildChangeSummary(rootDir, changeName, config) {
282
283
  }
283
284
 
284
285
  if (tasksExists) {
285
- const tasks = parseFrontmatter(await fsp.readFile(tasksPath, 'utf8'));
286
- const optionalSteps = ensureArray(tasks.data.optional_steps);
287
- const missing = activatedSteps.filter(step => !optionalSteps.includes(step));
288
- const checklistComplete = !/- \[ \]/.test(tasks.body);
289
- checks.push({
290
- name: 'tasks.md.optional_steps',
291
- status: missing.length === 0 ? 'pass' : 'fail',
292
- message:
293
- missing.length === 0
294
- ? 'All activated optional steps are present in tasks.md'
295
- : `Missing optional steps in tasks.md: ${missing.join(', ')}`,
296
- });
297
- checks.push({
298
- name: 'tasks.md.checklist',
299
- status: checklistComplete ? 'pass' : 'warn',
300
- message: checklistComplete ? 'tasks.md checklist is complete' : 'tasks.md still has unchecked items',
286
+ const tasks = analyzeWorkflowChecklistDocument(await fsp.readFile(tasksPath, 'utf8'), {
287
+ name: 'tasks.md',
288
+ activatedSteps,
289
+ requiredFields: [
290
+ ['feature', 'string'],
291
+ ['created', 'string_or_date'],
292
+ ['optional_steps', 'array'],
293
+ ],
301
294
  });
295
+ checks.push(...tasks.checks);
302
296
  }
303
297
 
304
298
  if (verificationExists) {
305
- const verification = parseFrontmatter(await fsp.readFile(verificationPath, 'utf8'));
306
- const optionalSteps = ensureArray(verification.data.optional_steps);
307
- const missing = activatedSteps.filter(step => !optionalSteps.includes(step));
308
- const checklistComplete = !/- \[ \]/.test(verification.body);
309
- checks.push({
310
- name: 'verification.md.optional_steps',
311
- status: missing.length === 0 ? 'pass' : 'fail',
312
- message:
313
- missing.length === 0
314
- ? 'All activated optional steps are present in verification.md'
315
- : `Missing optional steps in verification.md: ${missing.join(', ')}`,
316
- });
317
- checks.push({
318
- name: 'verification.md.checklist',
319
- status: checklistComplete ? 'pass' : 'warn',
320
- message:
321
- checklistComplete
322
- ? 'verification.md checklist is complete'
323
- : 'verification.md still has unchecked items',
299
+ const verification = analyzeWorkflowChecklistDocument(await fsp.readFile(verificationPath, 'utf8'), {
300
+ name: 'verification.md',
301
+ activatedSteps,
302
+ requiredFields: [
303
+ ['feature', 'string'],
304
+ ['created', 'string_or_date'],
305
+ ['status', 'string'],
306
+ ['optional_steps', 'array'],
307
+ ['passed_optional_steps', 'array'],
308
+ ],
324
309
  });
310
+ checks.push(...verification.checks);
325
311
  }
326
312
 
327
313
  const hasProtocolIssues = checks.some(check => check.status !== 'pass');
@@ -476,6 +462,93 @@ function parseSkillFile(content) {
476
462
  };
477
463
  }
478
464
 
465
+ function analyzeWorkflowChecklistDocument(content, options) {
466
+ const hasFrontmatter = /^---\r?\n[\s\S]*?\r?\n---(?:\r?\n|$)/.test(content);
467
+ let parsed = null;
468
+ let parseError = null;
469
+
470
+ if (hasFrontmatter) {
471
+ try {
472
+ parsed = matter(content);
473
+ } catch (error) {
474
+ parseError = error;
475
+ }
476
+ }
477
+
478
+ const data = parsed?.data ?? {};
479
+ const optionalStepsFieldValid = Array.isArray(data.optional_steps);
480
+ const optionalSteps = optionalStepsFieldValid ? ensureArray(data.optional_steps) : [];
481
+ const invalidRequiredFields = options.requiredFields
482
+ .filter(([fieldName, fieldType]) => !isValidFrontmatterField(data[fieldName], fieldType))
483
+ .map(([fieldName]) => fieldName);
484
+ const missingActivatedSteps = optionalStepsFieldValid
485
+ ? options.activatedSteps.filter(step => !optionalSteps.includes(step))
486
+ : [...options.activatedSteps];
487
+ const checklistItems = parsed?.content.match(/^\s*-\s+\[(?: |x|X)\]\s+.+$/gm) ?? [];
488
+ const uncheckedItems = parsed?.content.match(/^\s*-\s+\[ \]\s+.+$/gm) ?? [];
489
+ const checklistStructureValid = checklistItems.length > 0;
490
+
491
+ let frontmatterMessage = `${options.name} frontmatter parsed successfully`;
492
+ if (!hasFrontmatter) {
493
+ frontmatterMessage = `${options.name} is missing a valid frontmatter block`;
494
+ } else if (parseError) {
495
+ frontmatterMessage = `${options.name} frontmatter cannot be parsed: ${parseError.message}`;
496
+ }
497
+
498
+ let requiredFieldsMessage = `${options.name} has all required frontmatter fields`;
499
+ if (!hasFrontmatter || parseError) {
500
+ requiredFieldsMessage = `Cannot validate required fields in ${options.name} because frontmatter is invalid`;
501
+ } else if (invalidRequiredFields.length > 0) {
502
+ requiredFieldsMessage = `Missing or invalid required fields in ${options.name}: ${invalidRequiredFields.join(', ')}`;
503
+ }
504
+
505
+ let optionalStepsMessage = `All activated optional steps are present in ${options.name}`;
506
+ if (!optionalStepsFieldValid) {
507
+ optionalStepsMessage = `${options.name} frontmatter field optional_steps must be an array`;
508
+ } else if (missingActivatedSteps.length > 0) {
509
+ optionalStepsMessage = `Missing optional steps in ${options.name}: ${missingActivatedSteps.join(', ')}`;
510
+ }
511
+
512
+ let checklistStatus = 'pass';
513
+ let checklistMessage = `${options.name} checklist is complete`;
514
+ if (!hasFrontmatter || parseError) {
515
+ checklistStatus = 'fail';
516
+ checklistMessage = `${options.name} checklist cannot be validated because frontmatter is invalid`;
517
+ } else if (!checklistStructureValid) {
518
+ checklistStatus = 'fail';
519
+ checklistMessage = `${options.name} must contain at least one Markdown checklist item`;
520
+ } else if (uncheckedItems.length > 0) {
521
+ checklistStatus = 'warn';
522
+ checklistMessage = `${options.name} still has unchecked items`;
523
+ }
524
+
525
+ return {
526
+ optionalSteps,
527
+ checks: [
528
+ {
529
+ name: `${options.name}.frontmatter`,
530
+ status: hasFrontmatter && parseError === null ? 'pass' : 'fail',
531
+ message: frontmatterMessage,
532
+ },
533
+ {
534
+ name: `${options.name}.required_fields`,
535
+ status: hasFrontmatter && parseError === null && invalidRequiredFields.length === 0 ? 'pass' : 'fail',
536
+ message: requiredFieldsMessage,
537
+ },
538
+ {
539
+ name: `${options.name}.optional_steps`,
540
+ status: optionalStepsFieldValid && missingActivatedSteps.length === 0 ? 'pass' : 'fail',
541
+ message: optionalStepsMessage,
542
+ },
543
+ {
544
+ name: `${options.name}.checklist`,
545
+ status: checklistStatus,
546
+ message: checklistMessage,
547
+ },
548
+ ],
549
+ };
550
+ }
551
+
479
552
  function normalizeLineEndings(content) {
480
553
  return String(content || '').replace(/\r\n?/g, '\n');
481
554
  }
@@ -517,6 +590,25 @@ function parseFrontmatter(content) {
517
590
  };
518
591
  }
519
592
 
593
+ function isValidFrontmatterField(value, type) {
594
+ if (type === 'string') {
595
+ return typeof value === 'string' && value.trim().length > 0;
596
+ }
597
+
598
+ if (type === 'string_or_date') {
599
+ return (
600
+ (typeof value === 'string' && value.trim().length > 0) ||
601
+ (value instanceof Date && !Number.isNaN(value.getTime()))
602
+ );
603
+ }
604
+
605
+ if (type === 'array') {
606
+ return Array.isArray(value);
607
+ }
608
+
609
+ return false;
610
+ }
611
+
520
612
  function parseValue(rawValue) {
521
613
  if (rawValue === '') {
522
614
  return [];
@@ -14,5 +14,4 @@ export declare class DateUtils {
14
14
  * 解析 ISO 字符串
15
15
  */
16
16
  static parseISO(dateString: string): Date;
17
- }
18
- //# sourceMappingURL=DateUtils.d.ts.map
17
+ }
@@ -36,5 +36,4 @@ class DateUtils {
36
36
  return new Date(dateString);
37
37
  }
38
38
  }
39
- exports.DateUtils = DateUtils;
40
- //# sourceMappingURL=DateUtils.js.map
39
+ exports.DateUtils = DateUtils;
@@ -6,4 +6,3 @@ export declare class PathUtils {
6
6
  static isAbsolute(filePath: string): boolean;
7
7
  static getRelative(from: string, to: string): string;
8
8
  }
9
- //# sourceMappingURL=PathUtils.d.ts.map
@@ -63,4 +63,3 @@ class PathUtils {
63
63
  }
64
64
  }
65
65
  exports.PathUtils = PathUtils;
66
- //# sourceMappingURL=PathUtils.js.map
@@ -22,5 +22,4 @@ export declare class StringUtils {
22
22
  * 去除空白
23
23
  */
24
24
  static trim(str: string): string;
25
- }
26
- //# sourceMappingURL=StringUtils.d.ts.map
25
+ }
@@ -43,5 +43,4 @@ class StringUtils {
43
43
  return str.trim();
44
44
  }
45
45
  }
46
- exports.StringUtils = StringUtils;
47
- //# sourceMappingURL=StringUtils.js.map
46
+ exports.StringUtils = StringUtils;
@@ -1,3 +1,2 @@
1
1
  export declare function quoteCliArg(value: string): string;
2
2
  export declare function formatCliCommand(...args: Array<string | null | undefined>): string;
3
- //# sourceMappingURL=helpers.d.ts.map
@@ -19,4 +19,3 @@ function formatCliCommand(...args) {
19
19
  .join(' ');
20
20
  }
21
21
  exports.formatCliCommand = formatCliCommand;
22
- //# sourceMappingURL=helpers.js.map
@@ -3,5 +3,4 @@
3
3
  */
4
4
  export * from './PathUtils';
5
5
  export * from './StringUtils';
6
- export * from './DateUtils';
7
- //# sourceMappingURL=index.d.ts.map
6
+ export * from './DateUtils';
@@ -19,5 +19,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
20
  __exportStar(require("./PathUtils"), exports);
21
21
  __exportStar(require("./StringUtils"), exports);
22
- __exportStar(require("./DateUtils"), exports);
23
- //# sourceMappingURL=index.js.map
22
+ __exportStar(require("./DateUtils"), exports);
@@ -1,5 +1,4 @@
1
1
  /**
2
2
  * 日志输出
3
3
  * TODO: 实现日志功能
4
- */
5
- //# sourceMappingURL=logger.d.ts.map
4
+ */
@@ -2,5 +2,4 @@
2
2
  /**
3
3
  * 日志输出
4
4
  * TODO: 实现日志功能
5
- */
6
- //# sourceMappingURL=logger.js.map
5
+ */
@@ -1,5 +1,4 @@
1
1
  /**
2
2
  * 路径处理
3
3
  * TODO: 实现路径处理函数
4
- */
5
- //# sourceMappingURL=path.d.ts.map
4
+ */
@@ -2,5 +2,4 @@
2
2
  /**
3
3
  * 路径处理
4
4
  * TODO: 实现路径处理函数
5
- */
6
- //# sourceMappingURL=path.js.map
5
+ */
@@ -8,4 +8,3 @@ export declare function getBatchHelpText(): string;
8
8
  export declare function getChangesHelpText(): string;
9
9
  export declare function getQueueHelpText(): string;
10
10
  export declare function getRunHelpText(): string;
11
- //# sourceMappingURL=subcommandHelp.d.ts.map
@@ -116,4 +116,3 @@ Run Commands:
116
116
  ospec run help - show run command help
117
117
  `;
118
118
  }
119
- //# sourceMappingURL=subcommandHelp.js.map
@@ -26,5 +26,4 @@ export interface ArchiveProtocolState {
26
26
  export declare class ArchiveGate {
27
27
  checkArchiveReadiness(featureState: FeatureState, config: ArchiveGateConfig, protocolState?: ArchiveProtocolState): Promise<ArchiveCheckResult>;
28
28
  }
29
- export declare const archiveGate: ArchiveGate;
30
- //# sourceMappingURL=ArchiveGate.d.ts.map
29
+ export declare const archiveGate: ArchiveGate;
@@ -89,5 +89,4 @@ class ArchiveGate {
89
89
  }
90
90
  }
91
91
  exports.ArchiveGate = ArchiveGate;
92
- exports.archiveGate = new ArchiveGate();
93
- //# sourceMappingURL=ArchiveGate.js.map
92
+ exports.archiveGate = new ArchiveGate();
@@ -85,5 +85,4 @@ export declare class ConfigurableWorkflow {
85
85
  * 获取当前模式
86
86
  */
87
87
  getMode(): string;
88
- }
89
- //# sourceMappingURL=ConfigurableWorkflow.d.ts.map
88
+ }
@@ -182,5 +182,4 @@ class ConfigurableWorkflow {
182
182
  return this.mode;
183
183
  }
184
184
  }
185
- exports.ConfigurableWorkflow = ConfigurableWorkflow;
186
- //# sourceMappingURL=ConfigurableWorkflow.js.map
185
+ exports.ConfigurableWorkflow = ConfigurableWorkflow;
@@ -34,5 +34,4 @@ export declare class HookSystem {
34
34
  count: number;
35
35
  }[];
36
36
  }
37
- export declare const hookSystem: HookSystem;
38
- //# sourceMappingURL=HookSystem.d.ts.map
37
+ export declare const hookSystem: HookSystem;
@@ -62,5 +62,4 @@ class HookSystem {
62
62
  }
63
63
  }
64
64
  exports.HookSystem = HookSystem;
65
- exports.hookSystem = new HookSystem();
66
- //# sourceMappingURL=HookSystem.js.map
65
+ exports.hookSystem = new HookSystem();
@@ -45,5 +45,4 @@ export declare class IndexRegenerator {
45
45
  errors: string[];
46
46
  }>;
47
47
  }
48
- export declare const indexRegenerator: IndexRegenerator;
49
- //# sourceMappingURL=IndexRegenerator.d.ts.map
48
+ export declare const indexRegenerator: IndexRegenerator;
@@ -143,5 +143,4 @@ class IndexRegenerator {
143
143
  }
144
144
  }
145
145
  exports.IndexRegenerator = IndexRegenerator;
146
- exports.indexRegenerator = new IndexRegenerator();
147
- //# sourceMappingURL=IndexRegenerator.js.map
146
+ exports.indexRegenerator = new IndexRegenerator();
@@ -135,4 +135,3 @@ export declare class PluginWorkflowComposer {
135
135
  unsupportedFlags: string[];
136
136
  };
137
137
  }
138
- //# sourceMappingURL=PluginWorkflowComposer.d.ts.map
@@ -236,4 +236,3 @@ class PluginWorkflowComposer {
236
236
  }
237
237
  }
238
238
  exports.PluginWorkflowComposer = PluginWorkflowComposer;
239
- //# sourceMappingURL=PluginWorkflowComposer.js.map
@@ -22,5 +22,4 @@ export declare class SkillUpdateEngine {
22
22
  }>;
23
23
  exportSkillPackage(featureDir: string): Promise<Buffer>;
24
24
  }
25
- export declare const skillUpdateEngine: SkillUpdateEngine;
26
- //# sourceMappingURL=SkillUpdateEngine.d.ts.map
25
+ export declare const skillUpdateEngine: SkillUpdateEngine;
@@ -109,5 +109,4 @@ ${content}`;
109
109
  }
110
110
  }
111
111
  exports.SkillUpdateEngine = SkillUpdateEngine;
112
- exports.skillUpdateEngine = new SkillUpdateEngine();
113
- //# sourceMappingURL=SkillUpdateEngine.js.map
112
+ exports.skillUpdateEngine = new SkillUpdateEngine();
@@ -20,5 +20,4 @@ export declare class VerificationSystem {
20
20
  critical: boolean;
21
21
  }>;
22
22
  }
23
- export declare const verificationSystem: VerificationSystem;
24
- //# sourceMappingURL=VerificationSystem.d.ts.map
23
+ export declare const verificationSystem: VerificationSystem;
@@ -112,5 +112,4 @@ class VerificationSystem {
112
112
  }
113
113
  }
114
114
  exports.VerificationSystem = VerificationSystem;
115
- exports.verificationSystem = new VerificationSystem();
116
- //# sourceMappingURL=VerificationSystem.js.map
115
+ exports.verificationSystem = new VerificationSystem();
@@ -11,5 +11,4 @@ export declare class WorkflowEngine {
11
11
  percentage: number;
12
12
  };
13
13
  }
14
- export declare const workflowEngine: WorkflowEngine;
15
- //# sourceMappingURL=WorkflowEngine.d.ts.map
14
+ export declare const workflowEngine: WorkflowEngine;
@@ -53,5 +53,4 @@ class WorkflowEngine {
53
53
  }
54
54
  }
55
55
  exports.WorkflowEngine = WorkflowEngine;
56
- exports.workflowEngine = new WorkflowEngine();
57
- //# sourceMappingURL=WorkflowEngine.js.map
56
+ exports.workflowEngine = new WorkflowEngine();
@@ -16,4 +16,3 @@ export { ConfigurableWorkflow, WORKFLOW_PRESETS } from './ConfigurableWorkflow';
16
16
  export type { CoreStep, OptionalStep, OptionalStepConfig, WorkflowConfigType } from './ConfigurableWorkflow';
17
17
  export { PluginWorkflowComposer, DEFAULT_STITCH_PLUGIN_CONFIG, DEFAULT_CHECKPOINT_PLUGIN_CONFIG } from './PluginWorkflowComposer';
18
18
  export type { EnabledPluginSummary, PluginCapabilitySummary } from './PluginWorkflowComposer';
19
- //# sourceMappingURL=index.d.ts.map
@@ -29,4 +29,3 @@ var PluginWorkflowComposer_1 = require("./PluginWorkflowComposer");
29
29
  Object.defineProperty(exports, "DEFAULT_STITCH_PLUGIN_CONFIG", { enumerable: true, get: function () { return PluginWorkflowComposer_1.DEFAULT_STITCH_PLUGIN_CONFIG; } });
30
30
  Object.defineProperty(exports, "DEFAULT_CHECKPOINT_PLUGIN_CONFIG", { enumerable: true, get: function () { return PluginWorkflowComposer_1.DEFAULT_CHECKPOINT_PLUGIN_CONFIG; } });
31
31
  Object.defineProperty(exports, "PluginWorkflowComposer", { enumerable: true, get: function () { return PluginWorkflowComposer_1.PluginWorkflowComposer; } });
32
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@clawplays/ospec-cli",
3
- "version": "0.3.7",
4
- "description": "CLI tool for enforcing ospec workflow",
3
+ "version": "0.3.9",
4
+ "description": "Official OSpec CLI package for spec-driven development (SDD) and document-driven development in AI coding agent and CLI workflows.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "bin": {
@@ -11,17 +11,23 @@
11
11
  "access": "public"
12
12
  },
13
13
  "scripts": {
14
- "build": "tsc",
15
- "dev": "tsc --watch",
14
+ "build": "tsc && node scripts/strip-sourcemap-refs.js",
15
+ "dev": "node scripts/dev-watch.js",
16
16
  "postinstall": "node scripts/postinstall.js",
17
+ "prepack": "node scripts/strip-sourcemap-refs.js",
17
18
  "test": "vitest",
18
19
  "test:run": "vitest --run",
19
20
  "lint": "eslint src tests --ext .ts",
20
21
  "format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
21
22
  "index:rebuild": "node dist/tools/build-index.js",
22
23
  "validate": "node dist/cli/commands/validate.js",
24
+ "release:cut": "node scripts/release-cut.js",
25
+ "release:cut:patch": "node scripts/release-cut.js patch",
26
+ "release:cut:minor": "node scripts/release-cut.js minor",
27
+ "release:cut:major": "node scripts/release-cut.js major",
23
28
  "release:smoke": "node scripts/release-smoke.js",
24
29
  "release:notes": "node scripts/release-notes.js",
30
+ "release:upload-notes": "node scripts/release-upload-notes.js",
25
31
  "release:sync-version": "node scripts/sync-version.js",
26
32
  "release:bump:patch": "npm version patch --no-git-tag-version",
27
33
  "release:bump:minor": "npm version minor --no-git-tag-version",
@@ -32,16 +38,19 @@
32
38
  },
33
39
  "keywords": [
34
40
  "ospec",
35
- "workflow",
36
- "cli",
37
- "automation"
41
+ "ospec-cli",
42
+ "spec-driven development",
43
+ "sdd",
44
+ "document-driven development",
45
+ "ai coding agents",
46
+ "cli workflows"
38
47
  ],
39
48
  "author": "clawplays <ai@clawplays.com>",
40
49
  "repository": {
41
50
  "type": "git",
42
51
  "url": "git+https://github.com/clawplays/ospec.git"
43
52
  },
44
- "homepage": "https://github.com/clawplays/ospec",
53
+ "homepage": "https://ospec.ai/",
45
54
  "bugs": {
46
55
  "url": "https://github.com/clawplays/ospec/issues"
47
56
  },
package/skill.yaml CHANGED
@@ -19,7 +19,7 @@ protocol:
19
19
  - ".skillrc"
20
20
  - "SKILL.md"
21
21
  - "SKILL.index.json"
22
- - "build-index-auto.cjs"
22
+ - ".ospec/tools/build-index-auto.cjs"
23
23
  - "for-ai/ai-guide.md"
24
24
  - "for-ai/execution-protocol.md"
25
25
  - "for-ai/naming-conventions.md"
@@ -139,7 +139,7 @@ usage:
139
139
  - "Create the first active change explicitly."
140
140
  - "Run your project deployment and validation flow, then use ospec verify [changes/active/<change>]."
141
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."
142
+ - "Verify .skillrc, changes/, .ospec/, .ospec/tools/build-index-auto.cjs, for-ai docs, and docs/project/* before claiming init is complete."
143
143
  - "Use presets only as planning defaults; scaffold still requires explicit intent."
144
144
  prompt_shortcuts:
145
145
  - "initialize this project"