@fission-ai/openspec 0.23.0 → 1.0.0

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 (183) hide show
  1. package/README.md +111 -382
  2. package/dist/cli/index.js +120 -6
  3. package/dist/commands/workflow/index.d.ts +17 -0
  4. package/dist/commands/workflow/index.js +12 -0
  5. package/dist/commands/workflow/instructions.d.ts +29 -0
  6. package/dist/commands/workflow/instructions.js +381 -0
  7. package/dist/commands/workflow/new-change.d.ts +11 -0
  8. package/dist/commands/workflow/new-change.js +44 -0
  9. package/dist/commands/workflow/schemas.d.ts +10 -0
  10. package/dist/commands/workflow/schemas.js +34 -0
  11. package/dist/commands/workflow/shared.d.ts +52 -0
  12. package/dist/commands/workflow/shared.js +111 -0
  13. package/dist/commands/workflow/status.d.ts +14 -0
  14. package/dist/commands/workflow/status.js +58 -0
  15. package/dist/commands/workflow/templates.d.ts +16 -0
  16. package/dist/commands/workflow/templates.js +68 -0
  17. package/dist/core/artifact-graph/instruction-loader.d.ts +5 -1
  18. package/dist/core/artifact-graph/instruction-loader.js +8 -19
  19. package/dist/core/command-generation/adapters/amazon-q.d.ts +13 -0
  20. package/dist/core/command-generation/adapters/amazon-q.js +26 -0
  21. package/dist/core/command-generation/adapters/antigravity.d.ts +13 -0
  22. package/dist/core/command-generation/adapters/antigravity.js +26 -0
  23. package/dist/core/command-generation/adapters/auggie.d.ts +13 -0
  24. package/dist/core/command-generation/adapters/auggie.js +27 -0
  25. package/dist/core/command-generation/adapters/claude.d.ts +13 -0
  26. package/dist/core/command-generation/adapters/claude.js +50 -0
  27. package/dist/core/command-generation/adapters/cline.d.ts +14 -0
  28. package/dist/core/command-generation/adapters/cline.js +27 -0
  29. package/dist/core/command-generation/adapters/codebuddy.d.ts +13 -0
  30. package/dist/core/command-generation/adapters/codebuddy.js +28 -0
  31. package/dist/core/command-generation/adapters/codex.d.ts +13 -0
  32. package/dist/core/command-generation/adapters/codex.js +27 -0
  33. package/dist/core/command-generation/adapters/continue.d.ts +13 -0
  34. package/dist/core/command-generation/adapters/continue.js +28 -0
  35. package/dist/core/command-generation/adapters/costrict.d.ts +13 -0
  36. package/dist/core/command-generation/adapters/costrict.js +27 -0
  37. package/dist/core/command-generation/adapters/crush.d.ts +13 -0
  38. package/dist/core/command-generation/adapters/crush.js +30 -0
  39. package/dist/core/command-generation/adapters/cursor.d.ts +14 -0
  40. package/dist/core/command-generation/adapters/cursor.js +44 -0
  41. package/dist/core/command-generation/adapters/factory.d.ts +13 -0
  42. package/dist/core/command-generation/adapters/factory.js +27 -0
  43. package/dist/core/command-generation/adapters/gemini.d.ts +13 -0
  44. package/dist/core/command-generation/adapters/gemini.js +26 -0
  45. package/dist/core/command-generation/adapters/github-copilot.d.ts +13 -0
  46. package/dist/core/command-generation/adapters/github-copilot.js +26 -0
  47. package/dist/core/command-generation/adapters/iflow.d.ts +13 -0
  48. package/dist/core/command-generation/adapters/iflow.js +29 -0
  49. package/dist/core/command-generation/adapters/index.d.ts +27 -0
  50. package/dist/core/command-generation/adapters/index.js +27 -0
  51. package/dist/core/command-generation/adapters/kilocode.d.ts +14 -0
  52. package/dist/core/command-generation/adapters/kilocode.js +23 -0
  53. package/dist/core/command-generation/adapters/opencode.d.ts +13 -0
  54. package/dist/core/command-generation/adapters/opencode.js +26 -0
  55. package/dist/core/command-generation/adapters/qoder.d.ts +13 -0
  56. package/dist/core/command-generation/adapters/qoder.js +30 -0
  57. package/dist/core/command-generation/adapters/qwen.d.ts +13 -0
  58. package/dist/core/command-generation/adapters/qwen.js +26 -0
  59. package/dist/core/command-generation/adapters/roocode.d.ts +14 -0
  60. package/dist/core/command-generation/adapters/roocode.js +27 -0
  61. package/dist/core/command-generation/adapters/windsurf.d.ts +14 -0
  62. package/dist/core/command-generation/adapters/windsurf.js +51 -0
  63. package/dist/core/command-generation/generator.d.ts +21 -0
  64. package/dist/core/command-generation/generator.js +27 -0
  65. package/dist/core/command-generation/index.d.ts +22 -0
  66. package/dist/core/command-generation/index.js +24 -0
  67. package/dist/core/command-generation/registry.d.ts +36 -0
  68. package/dist/core/command-generation/registry.js +88 -0
  69. package/dist/core/command-generation/types.d.ts +55 -0
  70. package/dist/core/command-generation/types.js +8 -0
  71. package/dist/core/config.d.ts +1 -0
  72. package/dist/core/config.js +21 -21
  73. package/dist/core/init.d.ts +16 -36
  74. package/dist/core/init.js +323 -534
  75. package/dist/core/legacy-cleanup.d.ts +162 -0
  76. package/dist/core/legacy-cleanup.js +501 -0
  77. package/dist/core/shared/index.d.ts +8 -0
  78. package/dist/core/shared/index.js +8 -0
  79. package/dist/core/shared/skill-generation.d.ts +41 -0
  80. package/dist/core/shared/skill-generation.js +76 -0
  81. package/dist/core/shared/tool-detection.d.ts +66 -0
  82. package/dist/core/shared/tool-detection.js +140 -0
  83. package/dist/core/templates/index.d.ts +7 -16
  84. package/dist/core/templates/index.js +8 -36
  85. package/dist/core/templates/skill-templates.d.ts +13 -0
  86. package/dist/core/templates/skill-templates.js +627 -21
  87. package/dist/core/update.d.ts +38 -0
  88. package/dist/core/update.js +280 -62
  89. package/dist/prompts/searchable-multi-select.d.ts +27 -0
  90. package/dist/prompts/searchable-multi-select.js +149 -0
  91. package/dist/ui/ascii-patterns.d.ts +16 -0
  92. package/dist/ui/ascii-patterns.js +133 -0
  93. package/dist/ui/welcome-screen.d.ts +10 -0
  94. package/dist/ui/welcome-screen.js +146 -0
  95. package/dist/utils/file-system.d.ts +11 -0
  96. package/dist/utils/file-system.js +65 -2
  97. package/dist/utils/index.d.ts +1 -0
  98. package/dist/utils/index.js +2 -0
  99. package/package.json +1 -1
  100. package/dist/commands/artifact-workflow.d.ts +0 -17
  101. package/dist/commands/artifact-workflow.js +0 -915
  102. package/dist/core/configurators/agents.d.ts +0 -8
  103. package/dist/core/configurators/agents.js +0 -15
  104. package/dist/core/configurators/base.d.ts +0 -7
  105. package/dist/core/configurators/base.js +0 -2
  106. package/dist/core/configurators/claude.d.ts +0 -8
  107. package/dist/core/configurators/claude.js +0 -15
  108. package/dist/core/configurators/cline.d.ts +0 -8
  109. package/dist/core/configurators/cline.js +0 -15
  110. package/dist/core/configurators/codebuddy.d.ts +0 -8
  111. package/dist/core/configurators/codebuddy.js +0 -15
  112. package/dist/core/configurators/costrict.d.ts +0 -8
  113. package/dist/core/configurators/costrict.js +0 -15
  114. package/dist/core/configurators/iflow.d.ts +0 -8
  115. package/dist/core/configurators/iflow.js +0 -15
  116. package/dist/core/configurators/qoder.d.ts +0 -30
  117. package/dist/core/configurators/qoder.js +0 -42
  118. package/dist/core/configurators/qwen.d.ts +0 -24
  119. package/dist/core/configurators/qwen.js +0 -37
  120. package/dist/core/configurators/registry.d.ts +0 -9
  121. package/dist/core/configurators/registry.js +0 -43
  122. package/dist/core/configurators/slash/amazon-q.d.ts +0 -9
  123. package/dist/core/configurators/slash/amazon-q.js +0 -46
  124. package/dist/core/configurators/slash/antigravity.d.ts +0 -9
  125. package/dist/core/configurators/slash/antigravity.js +0 -23
  126. package/dist/core/configurators/slash/auggie.d.ts +0 -9
  127. package/dist/core/configurators/slash/auggie.js +0 -31
  128. package/dist/core/configurators/slash/base.d.ts +0 -19
  129. package/dist/core/configurators/slash/base.js +0 -69
  130. package/dist/core/configurators/slash/claude.d.ts +0 -9
  131. package/dist/core/configurators/slash/claude.js +0 -37
  132. package/dist/core/configurators/slash/cline.d.ts +0 -9
  133. package/dist/core/configurators/slash/cline.js +0 -23
  134. package/dist/core/configurators/slash/codebuddy.d.ts +0 -9
  135. package/dist/core/configurators/slash/codebuddy.js +0 -34
  136. package/dist/core/configurators/slash/codex.d.ts +0 -14
  137. package/dist/core/configurators/slash/codex.js +0 -109
  138. package/dist/core/configurators/slash/continue.d.ts +0 -9
  139. package/dist/core/configurators/slash/continue.js +0 -46
  140. package/dist/core/configurators/slash/costrict.d.ts +0 -9
  141. package/dist/core/configurators/slash/costrict.js +0 -31
  142. package/dist/core/configurators/slash/crush.d.ts +0 -9
  143. package/dist/core/configurators/slash/crush.js +0 -37
  144. package/dist/core/configurators/slash/cursor.d.ts +0 -9
  145. package/dist/core/configurators/slash/cursor.js +0 -37
  146. package/dist/core/configurators/slash/factory.d.ts +0 -10
  147. package/dist/core/configurators/slash/factory.js +0 -35
  148. package/dist/core/configurators/slash/gemini.d.ts +0 -9
  149. package/dist/core/configurators/slash/gemini.js +0 -22
  150. package/dist/core/configurators/slash/github-copilot.d.ts +0 -9
  151. package/dist/core/configurators/slash/github-copilot.js +0 -34
  152. package/dist/core/configurators/slash/iflow.d.ts +0 -9
  153. package/dist/core/configurators/slash/iflow.js +0 -37
  154. package/dist/core/configurators/slash/kilocode.d.ts +0 -9
  155. package/dist/core/configurators/slash/kilocode.js +0 -17
  156. package/dist/core/configurators/slash/opencode.d.ts +0 -12
  157. package/dist/core/configurators/slash/opencode.js +0 -72
  158. package/dist/core/configurators/slash/qoder.d.ts +0 -35
  159. package/dist/core/configurators/slash/qoder.js +0 -76
  160. package/dist/core/configurators/slash/qwen.d.ts +0 -32
  161. package/dist/core/configurators/slash/qwen.js +0 -49
  162. package/dist/core/configurators/slash/registry.d.ts +0 -8
  163. package/dist/core/configurators/slash/registry.js +0 -78
  164. package/dist/core/configurators/slash/roocode.d.ts +0 -9
  165. package/dist/core/configurators/slash/roocode.js +0 -23
  166. package/dist/core/configurators/slash/toml-base.d.ts +0 -10
  167. package/dist/core/configurators/slash/toml-base.js +0 -53
  168. package/dist/core/configurators/slash/windsurf.d.ts +0 -9
  169. package/dist/core/configurators/slash/windsurf.js +0 -23
  170. package/dist/core/templates/agents-root-stub.d.ts +0 -2
  171. package/dist/core/templates/agents-root-stub.js +0 -17
  172. package/dist/core/templates/agents-template.d.ts +0 -2
  173. package/dist/core/templates/agents-template.js +0 -458
  174. package/dist/core/templates/claude-template.d.ts +0 -2
  175. package/dist/core/templates/claude-template.js +0 -2
  176. package/dist/core/templates/cline-template.d.ts +0 -2
  177. package/dist/core/templates/cline-template.js +0 -2
  178. package/dist/core/templates/costrict-template.d.ts +0 -2
  179. package/dist/core/templates/costrict-template.js +0 -2
  180. package/dist/core/templates/project-template.d.ts +0 -8
  181. package/dist/core/templates/project-template.js +0 -32
  182. package/dist/core/templates/slash-command-templates.d.ts +0 -4
  183. package/dist/core/templates/slash-command-templates.js +0 -49
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Skill Generation Utilities
3
+ *
4
+ * Shared utilities for generating skill and command files.
5
+ */
6
+ import { getOpsxExploreCommandTemplate, type SkillTemplate } from '../templates/skill-templates.js';
7
+ import type { CommandContent } from '../command-generation/index.js';
8
+ /**
9
+ * Skill template with directory name mapping.
10
+ */
11
+ export interface SkillTemplateEntry {
12
+ template: SkillTemplate;
13
+ dirName: string;
14
+ }
15
+ /**
16
+ * Command template with ID mapping.
17
+ */
18
+ export interface CommandTemplateEntry {
19
+ template: ReturnType<typeof getOpsxExploreCommandTemplate>;
20
+ id: string;
21
+ }
22
+ /**
23
+ * Gets all skill templates with their directory names.
24
+ */
25
+ export declare function getSkillTemplates(): SkillTemplateEntry[];
26
+ /**
27
+ * Gets all command templates with their IDs.
28
+ */
29
+ export declare function getCommandTemplates(): CommandTemplateEntry[];
30
+ /**
31
+ * Converts command templates to CommandContent array.
32
+ */
33
+ export declare function getCommandContents(): CommandContent[];
34
+ /**
35
+ * Generates skill file content with YAML frontmatter.
36
+ *
37
+ * @param template - The skill template
38
+ * @param generatedByVersion - The OpenSpec version to embed in the file
39
+ */
40
+ export declare function generateSkillContent(template: SkillTemplate, generatedByVersion: string): string;
41
+ //# sourceMappingURL=skill-generation.d.ts.map
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Skill Generation Utilities
3
+ *
4
+ * Shared utilities for generating skill and command files.
5
+ */
6
+ import { getExploreSkillTemplate, getNewChangeSkillTemplate, getContinueChangeSkillTemplate, getApplyChangeSkillTemplate, getFfChangeSkillTemplate, getSyncSpecsSkillTemplate, getArchiveChangeSkillTemplate, getBulkArchiveChangeSkillTemplate, getVerifyChangeSkillTemplate, getOnboardSkillTemplate, getOpsxExploreCommandTemplate, getOpsxNewCommandTemplate, getOpsxContinueCommandTemplate, getOpsxApplyCommandTemplate, getOpsxFfCommandTemplate, getOpsxSyncCommandTemplate, getOpsxArchiveCommandTemplate, getOpsxBulkArchiveCommandTemplate, getOpsxVerifyCommandTemplate, getOpsxOnboardCommandTemplate, } from '../templates/skill-templates.js';
7
+ /**
8
+ * Gets all skill templates with their directory names.
9
+ */
10
+ export function getSkillTemplates() {
11
+ return [
12
+ { template: getExploreSkillTemplate(), dirName: 'openspec-explore' },
13
+ { template: getNewChangeSkillTemplate(), dirName: 'openspec-new-change' },
14
+ { template: getContinueChangeSkillTemplate(), dirName: 'openspec-continue-change' },
15
+ { template: getApplyChangeSkillTemplate(), dirName: 'openspec-apply-change' },
16
+ { template: getFfChangeSkillTemplate(), dirName: 'openspec-ff-change' },
17
+ { template: getSyncSpecsSkillTemplate(), dirName: 'openspec-sync-specs' },
18
+ { template: getArchiveChangeSkillTemplate(), dirName: 'openspec-archive-change' },
19
+ { template: getBulkArchiveChangeSkillTemplate(), dirName: 'openspec-bulk-archive-change' },
20
+ { template: getVerifyChangeSkillTemplate(), dirName: 'openspec-verify-change' },
21
+ { template: getOnboardSkillTemplate(), dirName: 'openspec-onboard' },
22
+ ];
23
+ }
24
+ /**
25
+ * Gets all command templates with their IDs.
26
+ */
27
+ export function getCommandTemplates() {
28
+ return [
29
+ { template: getOpsxExploreCommandTemplate(), id: 'explore' },
30
+ { template: getOpsxNewCommandTemplate(), id: 'new' },
31
+ { template: getOpsxContinueCommandTemplate(), id: 'continue' },
32
+ { template: getOpsxApplyCommandTemplate(), id: 'apply' },
33
+ { template: getOpsxFfCommandTemplate(), id: 'ff' },
34
+ { template: getOpsxSyncCommandTemplate(), id: 'sync' },
35
+ { template: getOpsxArchiveCommandTemplate(), id: 'archive' },
36
+ { template: getOpsxBulkArchiveCommandTemplate(), id: 'bulk-archive' },
37
+ { template: getOpsxVerifyCommandTemplate(), id: 'verify' },
38
+ { template: getOpsxOnboardCommandTemplate(), id: 'onboard' },
39
+ ];
40
+ }
41
+ /**
42
+ * Converts command templates to CommandContent array.
43
+ */
44
+ export function getCommandContents() {
45
+ const commandTemplates = getCommandTemplates();
46
+ return commandTemplates.map(({ template, id }) => ({
47
+ id,
48
+ name: template.name,
49
+ description: template.description,
50
+ category: template.category,
51
+ tags: template.tags,
52
+ body: template.content,
53
+ }));
54
+ }
55
+ /**
56
+ * Generates skill file content with YAML frontmatter.
57
+ *
58
+ * @param template - The skill template
59
+ * @param generatedByVersion - The OpenSpec version to embed in the file
60
+ */
61
+ export function generateSkillContent(template, generatedByVersion) {
62
+ return `---
63
+ name: ${template.name}
64
+ description: ${template.description}
65
+ license: ${template.license || 'MIT'}
66
+ compatibility: ${template.compatibility || 'Requires openspec CLI.'}
67
+ metadata:
68
+ author: ${template.metadata?.author || 'openspec'}
69
+ version: "${template.metadata?.version || '1.0'}"
70
+ generatedBy: "${generatedByVersion}"
71
+ ---
72
+
73
+ ${template.instructions}
74
+ `;
75
+ }
76
+ //# sourceMappingURL=skill-generation.js.map
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Tool Detection Utilities
3
+ *
4
+ * Shared utilities for detecting tool configurations and version status.
5
+ */
6
+ /**
7
+ * Names of skill directories created by openspec init.
8
+ */
9
+ export declare const SKILL_NAMES: readonly ["openspec-explore", "openspec-new-change", "openspec-continue-change", "openspec-apply-change", "openspec-ff-change", "openspec-sync-specs", "openspec-archive-change", "openspec-bulk-archive-change", "openspec-verify-change"];
10
+ export type SkillName = (typeof SKILL_NAMES)[number];
11
+ /**
12
+ * Status of skill configuration for a tool.
13
+ */
14
+ export interface ToolSkillStatus {
15
+ /** Whether the tool has any skills configured */
16
+ configured: boolean;
17
+ /** Whether all 9 skills are configured */
18
+ fullyConfigured: boolean;
19
+ /** Number of skills currently configured (0-9) */
20
+ skillCount: number;
21
+ }
22
+ /**
23
+ * Version information for a tool's skills.
24
+ */
25
+ export interface ToolVersionStatus {
26
+ /** The tool ID */
27
+ toolId: string;
28
+ /** The tool's display name */
29
+ toolName: string;
30
+ /** Whether the tool has any skills configured */
31
+ configured: boolean;
32
+ /** The generatedBy version found in the skill files, or null if not found */
33
+ generatedByVersion: string | null;
34
+ /** Whether the tool needs updating (version mismatch or missing) */
35
+ needsUpdate: boolean;
36
+ }
37
+ /**
38
+ * Gets the list of tools with skillsDir configured.
39
+ */
40
+ export declare function getToolsWithSkillsDir(): string[];
41
+ /**
42
+ * Checks which skill files exist for a tool.
43
+ */
44
+ export declare function getToolSkillStatus(projectRoot: string, toolId: string): ToolSkillStatus;
45
+ /**
46
+ * Gets the skill status for all tools with skillsDir configured.
47
+ */
48
+ export declare function getToolStates(projectRoot: string): Map<string, ToolSkillStatus>;
49
+ /**
50
+ * Extracts the generatedBy version from a skill file's YAML frontmatter.
51
+ * Returns null if the field is not found or the file doesn't exist.
52
+ */
53
+ export declare function extractGeneratedByVersion(skillFilePath: string): string | null;
54
+ /**
55
+ * Gets version status for a tool by reading the first available skill file.
56
+ */
57
+ export declare function getToolVersionStatus(projectRoot: string, toolId: string, currentVersion: string): ToolVersionStatus;
58
+ /**
59
+ * Gets all configured tools in the project.
60
+ */
61
+ export declare function getConfiguredTools(projectRoot: string): string[];
62
+ /**
63
+ * Gets version status for all configured tools.
64
+ */
65
+ export declare function getAllToolVersionStatus(projectRoot: string, currentVersion: string): ToolVersionStatus[];
66
+ //# sourceMappingURL=tool-detection.d.ts.map
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Tool Detection Utilities
3
+ *
4
+ * Shared utilities for detecting tool configurations and version status.
5
+ */
6
+ import path from 'path';
7
+ import * as fs from 'fs';
8
+ import { AI_TOOLS } from '../config.js';
9
+ /**
10
+ * Names of skill directories created by openspec init.
11
+ */
12
+ export const SKILL_NAMES = [
13
+ 'openspec-explore',
14
+ 'openspec-new-change',
15
+ 'openspec-continue-change',
16
+ 'openspec-apply-change',
17
+ 'openspec-ff-change',
18
+ 'openspec-sync-specs',
19
+ 'openspec-archive-change',
20
+ 'openspec-bulk-archive-change',
21
+ 'openspec-verify-change',
22
+ ];
23
+ /**
24
+ * Gets the list of tools with skillsDir configured.
25
+ */
26
+ export function getToolsWithSkillsDir() {
27
+ return AI_TOOLS.filter((t) => t.skillsDir).map((t) => t.value);
28
+ }
29
+ /**
30
+ * Checks which skill files exist for a tool.
31
+ */
32
+ export function getToolSkillStatus(projectRoot, toolId) {
33
+ const tool = AI_TOOLS.find((t) => t.value === toolId);
34
+ if (!tool?.skillsDir) {
35
+ return { configured: false, fullyConfigured: false, skillCount: 0 };
36
+ }
37
+ const skillsDir = path.join(projectRoot, tool.skillsDir, 'skills');
38
+ let skillCount = 0;
39
+ for (const skillName of SKILL_NAMES) {
40
+ const skillFile = path.join(skillsDir, skillName, 'SKILL.md');
41
+ if (fs.existsSync(skillFile)) {
42
+ skillCount++;
43
+ }
44
+ }
45
+ return {
46
+ configured: skillCount > 0,
47
+ fullyConfigured: skillCount === SKILL_NAMES.length,
48
+ skillCount,
49
+ };
50
+ }
51
+ /**
52
+ * Gets the skill status for all tools with skillsDir configured.
53
+ */
54
+ export function getToolStates(projectRoot) {
55
+ const states = new Map();
56
+ const toolIds = AI_TOOLS.filter((t) => t.skillsDir).map((t) => t.value);
57
+ for (const toolId of toolIds) {
58
+ states.set(toolId, getToolSkillStatus(projectRoot, toolId));
59
+ }
60
+ return states;
61
+ }
62
+ /**
63
+ * Extracts the generatedBy version from a skill file's YAML frontmatter.
64
+ * Returns null if the field is not found or the file doesn't exist.
65
+ */
66
+ export function extractGeneratedByVersion(skillFilePath) {
67
+ try {
68
+ if (!fs.existsSync(skillFilePath)) {
69
+ return null;
70
+ }
71
+ const content = fs.readFileSync(skillFilePath, 'utf-8');
72
+ // Look for generatedBy in the YAML frontmatter
73
+ // The file format is:
74
+ // ---
75
+ // ...
76
+ // metadata:
77
+ // author: openspec
78
+ // version: "1.0"
79
+ // generatedBy: "0.23.0"
80
+ // ---
81
+ const generatedByMatch = content.match(/^\s*generatedBy:\s*["']?([^"'\n]+)["']?\s*$/m);
82
+ if (generatedByMatch && generatedByMatch[1]) {
83
+ return generatedByMatch[1].trim();
84
+ }
85
+ return null;
86
+ }
87
+ catch {
88
+ return null;
89
+ }
90
+ }
91
+ /**
92
+ * Gets version status for a tool by reading the first available skill file.
93
+ */
94
+ export function getToolVersionStatus(projectRoot, toolId, currentVersion) {
95
+ const tool = AI_TOOLS.find((t) => t.value === toolId);
96
+ if (!tool?.skillsDir) {
97
+ return {
98
+ toolId,
99
+ toolName: toolId,
100
+ configured: false,
101
+ generatedByVersion: null,
102
+ needsUpdate: false,
103
+ };
104
+ }
105
+ const skillsDir = path.join(projectRoot, tool.skillsDir, 'skills');
106
+ let generatedByVersion = null;
107
+ // Find the first skill file that exists and read its version
108
+ for (const skillName of SKILL_NAMES) {
109
+ const skillFile = path.join(skillsDir, skillName, 'SKILL.md');
110
+ if (fs.existsSync(skillFile)) {
111
+ generatedByVersion = extractGeneratedByVersion(skillFile);
112
+ break;
113
+ }
114
+ }
115
+ const configured = getToolSkillStatus(projectRoot, toolId).configured;
116
+ const needsUpdate = configured && (generatedByVersion === null || generatedByVersion !== currentVersion);
117
+ return {
118
+ toolId,
119
+ toolName: tool.name,
120
+ configured,
121
+ generatedByVersion,
122
+ needsUpdate,
123
+ };
124
+ }
125
+ /**
126
+ * Gets all configured tools in the project.
127
+ */
128
+ export function getConfiguredTools(projectRoot) {
129
+ return AI_TOOLS
130
+ .filter((t) => t.skillsDir && getToolSkillStatus(projectRoot, t.value).configured)
131
+ .map((t) => t.value);
132
+ }
133
+ /**
134
+ * Gets version status for all configured tools.
135
+ */
136
+ export function getAllToolVersionStatus(projectRoot, currentVersion) {
137
+ const configuredTools = getConfiguredTools(projectRoot);
138
+ return configuredTools.map((toolId) => getToolVersionStatus(projectRoot, toolId, currentVersion));
139
+ }
140
+ //# sourceMappingURL=tool-detection.js.map
@@ -1,17 +1,8 @@
1
- import { ProjectContext } from './project-template.js';
2
- import { SlashCommandId } from './slash-command-templates.js';
3
- export interface Template {
4
- path: string;
5
- content: string | ((context: ProjectContext) => string);
6
- }
7
- export declare class TemplateManager {
8
- static getTemplates(context?: ProjectContext): Template[];
9
- static getClaudeTemplate(): string;
10
- static getClineTemplate(): string;
11
- static getCostrictTemplate(): string;
12
- static getAgentsStandardTemplate(): string;
13
- static getSlashCommandBody(id: SlashCommandId): string;
14
- }
15
- export { ProjectContext } from './project-template.js';
16
- export type { SlashCommandId } from './slash-command-templates.js';
1
+ /**
2
+ * Template exports for OpenSpec.
3
+ *
4
+ * The old config file templates (AGENTS.md, project.md, claude-template, etc.)
5
+ * have been removed. The skill-based workflow uses skill-templates.ts directly.
6
+ */
7
+ export { getExploreSkillTemplate, getNewChangeSkillTemplate, getContinueChangeSkillTemplate, getApplyChangeSkillTemplate, getFfChangeSkillTemplate, getSyncSpecsSkillTemplate, getArchiveChangeSkillTemplate, getBulkArchiveChangeSkillTemplate, getVerifyChangeSkillTemplate, getOpsxExploreCommandTemplate, getOpsxNewCommandTemplate, getOpsxContinueCommandTemplate, getOpsxApplyCommandTemplate, getOpsxFfCommandTemplate, getOpsxSyncCommandTemplate, getOpsxArchiveCommandTemplate, getOpsxBulkArchiveCommandTemplate, getOpsxVerifyCommandTemplate, } from './skill-templates.js';
17
8
  //# sourceMappingURL=index.d.ts.map
@@ -1,37 +1,9 @@
1
- import { agentsTemplate } from './agents-template.js';
2
- import { projectTemplate } from './project-template.js';
3
- import { claudeTemplate } from './claude-template.js';
4
- import { clineTemplate } from './cline-template.js';
5
- import { costrictTemplate } from './costrict-template.js';
6
- import { agentsRootStubTemplate } from './agents-root-stub.js';
7
- import { getSlashCommandBody } from './slash-command-templates.js';
8
- export class TemplateManager {
9
- static getTemplates(context = {}) {
10
- return [
11
- {
12
- path: 'AGENTS.md',
13
- content: agentsTemplate
14
- },
15
- {
16
- path: 'project.md',
17
- content: projectTemplate(context)
18
- }
19
- ];
20
- }
21
- static getClaudeTemplate() {
22
- return claudeTemplate;
23
- }
24
- static getClineTemplate() {
25
- return clineTemplate;
26
- }
27
- static getCostrictTemplate() {
28
- return costrictTemplate;
29
- }
30
- static getAgentsStandardTemplate() {
31
- return agentsRootStubTemplate;
32
- }
33
- static getSlashCommandBody(id) {
34
- return getSlashCommandBody(id);
35
- }
36
- }
1
+ /**
2
+ * Template exports for OpenSpec.
3
+ *
4
+ * The old config file templates (AGENTS.md, project.md, claude-template, etc.)
5
+ * have been removed. The skill-based workflow uses skill-templates.ts directly.
6
+ */
7
+ // Re-export skill templates for convenience
8
+ export { getExploreSkillTemplate, getNewChangeSkillTemplate, getContinueChangeSkillTemplate, getApplyChangeSkillTemplate, getFfChangeSkillTemplate, getSyncSpecsSkillTemplate, getArchiveChangeSkillTemplate, getBulkArchiveChangeSkillTemplate, getVerifyChangeSkillTemplate, getOpsxExploreCommandTemplate, getOpsxNewCommandTemplate, getOpsxContinueCommandTemplate, getOpsxApplyCommandTemplate, getOpsxFfCommandTemplate, getOpsxSyncCommandTemplate, getOpsxArchiveCommandTemplate, getOpsxBulkArchiveCommandTemplate, getOpsxVerifyCommandTemplate, } from './skill-templates.js';
37
9
  //# sourceMappingURL=index.js.map
@@ -11,6 +11,9 @@ export interface SkillTemplate {
11
11
  name: string;
12
12
  description: string;
13
13
  instructions: string;
14
+ license?: string;
15
+ compatibility?: string;
16
+ metadata?: Record<string, string>;
14
17
  }
15
18
  /**
16
19
  * Template for openspec-explore skill
@@ -42,6 +45,11 @@ export declare function getFfChangeSkillTemplate(): SkillTemplate;
42
45
  * For syncing delta specs from a change to main specs (agent-driven)
43
46
  */
44
47
  export declare function getSyncSpecsSkillTemplate(): SkillTemplate;
48
+ /**
49
+ * Template for openspec-onboard skill
50
+ * Guided onboarding through the complete OpenSpec workflow
51
+ */
52
+ export declare function getOnboardSkillTemplate(): SkillTemplate;
45
53
  export interface CommandTemplate {
46
54
  name: string;
47
55
  description: string;
@@ -93,6 +101,11 @@ export declare function getVerifyChangeSkillTemplate(): SkillTemplate;
93
101
  * Template for /opsx:archive slash command
94
102
  */
95
103
  export declare function getOpsxArchiveCommandTemplate(): CommandTemplate;
104
+ /**
105
+ * Template for /opsx:onboard slash command
106
+ * Guided onboarding through the complete OpenSpec workflow
107
+ */
108
+ export declare function getOpsxOnboardCommandTemplate(): CommandTemplate;
96
109
  /**
97
110
  * Template for /opsx:bulk-archive slash command
98
111
  */