openspec-cn 0.23.1 → 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 (49) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +115 -31
  3. package/bin/openspec.js +2 -2
  4. package/dist/commands/feedback.js +4 -4
  5. package/dist/commands/schema.js +60 -60
  6. package/dist/core/command-generation/adapters/amazon-q.js +5 -5
  7. package/dist/core/command-generation/adapters/antigravity.js +5 -5
  8. package/dist/core/command-generation/adapters/auggie.js +6 -6
  9. package/dist/core/command-generation/adapters/claude.js +8 -8
  10. package/dist/core/command-generation/adapters/cline.js +5 -5
  11. package/dist/core/command-generation/adapters/codebuddy.js +7 -7
  12. package/dist/core/command-generation/adapters/codex.js +6 -6
  13. package/dist/core/command-generation/adapters/continue.js +7 -7
  14. package/dist/core/command-generation/adapters/costrict.js +6 -6
  15. package/dist/core/command-generation/adapters/crush.js +8 -8
  16. package/dist/core/command-generation/adapters/cursor.js +8 -8
  17. package/dist/core/command-generation/adapters/factory.js +6 -6
  18. package/dist/core/command-generation/adapters/gemini.js +5 -5
  19. package/dist/core/command-generation/adapters/github-copilot.js +5 -5
  20. package/dist/core/command-generation/adapters/iflow.js +8 -8
  21. package/dist/core/command-generation/adapters/kilocode.js +1 -1
  22. package/dist/core/command-generation/adapters/opencode.js +5 -5
  23. package/dist/core/command-generation/adapters/qoder.js +8 -8
  24. package/dist/core/command-generation/adapters/qwen.js +5 -5
  25. package/dist/core/command-generation/adapters/roocode.js +5 -5
  26. package/dist/core/command-generation/adapters/windsurf.js +8 -8
  27. package/dist/core/completions/generators/bash-generator.js +41 -41
  28. package/dist/core/completions/generators/fish-generator.js +7 -7
  29. package/dist/core/completions/generators/powershell-generator.js +29 -29
  30. package/dist/core/completions/generators/zsh-generator.js +33 -33
  31. package/dist/core/completions/templates/bash-templates.js +18 -18
  32. package/dist/core/completions/templates/fish-templates.js +32 -32
  33. package/dist/core/completions/templates/powershell-templates.js +19 -19
  34. package/dist/core/completions/templates/zsh-templates.js +30 -30
  35. package/dist/core/shared/skill-generation.js +15 -13
  36. package/dist/core/templates/skill-templates.d.ts +10 -0
  37. package/dist/core/templates/skill-templates.js +3187 -2637
  38. package/package.json +83 -83
  39. package/schemas/spec-driven/schema.yaml +148 -148
  40. package/schemas/spec-driven/templates/design.md +19 -19
  41. package/schemas/spec-driven/templates/proposal.md +23 -23
  42. package/schemas/spec-driven/templates/spec.md +8 -8
  43. package/schemas/spec-driven/templates/tasks.md +9 -9
  44. package/schemas/tdd/schema.yaml +213 -213
  45. package/schemas/tdd/templates/docs.md +15 -15
  46. package/schemas/tdd/templates/implementation.md +11 -11
  47. package/schemas/tdd/templates/spec.md +11 -11
  48. package/schemas/tdd/templates/test.md +11 -11
  49. package/scripts/postinstall.js +147 -147
package/LICENSE CHANGED
@@ -1,22 +1,22 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 OpenSpec Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
1
+ MIT License
2
+
3
+ Copyright (c) 2024 OpenSpec Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md CHANGED
@@ -1,33 +1,94 @@
1
1
  <p align="center">
2
- <a href="https://github.com/Fission-AI/OpenSpec">
2
+ <a href="https://github.com/xiangagou163/OpenSpec-cn">
3
3
  <picture>
4
- <source srcset="assets/openspec_pixel_dark.svg" media="(prefers-color-scheme: dark)">
5
- <source srcset="assets/openspec_pixel_light.svg" media="(prefers-color-scheme: light)">
6
- <img src="assets/openspec_pixel_light.svg" alt="OpenSpec logo" height="64">
4
+ <source srcset="assets/openspec_bg.png">
5
+ <img src="assets/openspec_bg.png" alt="OpenSpec logo">
7
6
  </picture>
8
7
  </a>
9
8
 
10
9
  </p>
11
10
  <p align="center">面向 AI 编码助手的规范驱动开发。</p>
12
11
  <p align="center">
13
- <a href="https://github.com/Fission-AI/OpenSpec/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/Fission-AI/OpenSpec/actions/workflows/ci.yml/badge.svg" /></a>
14
- <a href="https://www.npmjs.com/package/@fission-ai/openspec"><img alt="npm version" src="https://img.shields.io/npm/v/@fission-ai/openspec?style=flat-square" /></a>
15
- <a href="https://nodejs.org/"><img alt="node version" src="https://img.shields.io/node/v/@fission-ai/openspec?style=flat-square" /></a>
12
+ <a href="https://github.com/xiangagou163/OpenSpec-cn/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/xiangagou163/OpenSpec-cn/actions/workflows/ci.yml/badge.svg" /></a>
13
+ <a href="https://www.npmjs.com/package/openspec-cn"><img alt="npm version" src="https://img.shields.io/npm/v/openspec-cn?style=flat-square" /></a>
14
+ <a href="https://nodejs.org/"><img alt="node version" src="https://img.shields.io/node/v/openspec-cn?style=flat-square" /></a>
16
15
  <a href="./LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square" /></a>
17
16
  <a href="https://conventionalcommits.org"><img alt="Conventional Commits" src="https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square" /></a>
18
17
  <a href="https://discord.gg/YctCnvvshC"><img alt="Discord" src="https://img.shields.io/badge/Discord-Join%20the%20community-5865F2?logo=discord&logoColor=white&style=flat-square" /></a>
19
18
  </p>
20
19
 
20
+ <details>
21
+ <summary><strong>最受欢迎的规范框架。</strong></summary>
22
+
23
+ [![Stars](https://img.shields.io/github/stars/xiangagou163/OpenSpec-cn?style=flat-square&label=Stars)](https://github.com/xiangagou163/OpenSpec-cn/stargazers)
24
+ [![Downloads](https://img.shields.io/npm/dm/openspec-cn?style=flat-square&label=Downloads/mo)](https://www.npmjs.com/package/openspec-cn)
25
+ [![Contributors](https://img.shields.io/github/contributors/xiangagou163/OpenSpec-cn?style=flat-square&label=Contributors)](https://github.com/xiangagou163/OpenSpec-cn/graphs/contributors)
26
+
27
+ </details>
28
+ <p></p>
29
+ 我们的理念:
30
+
31
+ ```text
32
+ → 流动而非僵化
33
+ → 迭代而非瀑布
34
+ → 简单而非复杂
35
+ → 面向存量系统而非只为从零开始
36
+ → 可从个人项目扩展到企业规模
37
+ ```
38
+
39
+ > [!TIP]
40
+ > **新工作流已上线!** 我们使用新的工件驱动工作流重建了 OpenSpec。
41
+ >
42
+ > 运行 `/opsx:onboard` 开始使用。→ [了解更多](docs/opsx.md)
43
+
21
44
  <p align="center">
22
- <img src="assets/openspec_dashboard.png" alt="OpenSpec dashboard preview" width="90%">
45
+ 关注 <a href="https://x.com/0xTab">@0xTab</a> 获取更新 · 进入 <a href="https://discord.gg/YctCnvvshC">OpenSpec Discord</a> 获取帮助与答疑。
23
46
  </p>
24
47
 
48
+ ### 团队
49
+
50
+ 在团队中使用 OpenSpec?请 <a href="mailto:teams@openspec.dev">邮件联系</a> 获取 Slack 频道访问权限。
51
+
52
+ <!-- TODO: Add GIF demo of /opsx:new → /opsx:archive workflow -->
53
+
54
+ ## 实际演示
55
+
56
+ ```text
57
+ 你: /opsx:new add-dark-mode
58
+ AI: 已创建 openspec/changes/add-dark-mode/
59
+ 准备创建:proposal
60
+
61
+ 你: /opsx:ff # "fast-forward" - 生成所有规划文档
62
+ AI: ✓ proposal.md — 为什么做、改什么
63
+ ✓ specs/ — 需求与场景
64
+ ✓ design.md — 技术方案
65
+ ✓ tasks.md — 实现清单
66
+ 准备开始实现!
67
+
68
+ 你: /opsx:apply
69
+ AI: 正在实现任务...
70
+ ✓ 1.1 添加主题上下文 Provider
71
+ ✓ 1.2 创建切换组件
72
+ ✓ 2.1 添加 CSS 变量
73
+ ✓ 2.2 接入 localStorage
74
+ 任务全部完成!
75
+
76
+ 你: /opsx:archive
77
+ AI: 已归档到 openspec/changes/archive/2025-01-23-add-dark-mode/
78
+ 规范已更新。准备开始下一个功能。
79
+ ```
80
+
81
+ <details>
82
+ <summary><strong>OpenSpec Dashboard</strong></summary>
83
+
25
84
  <p align="center">
26
- 关注 <a href="https://x.com/0xTab">@0xTab</a> 获取更新 · 进入 <a href="https://discord.gg/YctCnvvshC">OpenSpec Discord</a> 获取帮助与答疑。
85
+ <img src="assets/openspec_dashboard.png" alt="OpenSpec dashboard preview" width="90%">
27
86
  </p>
28
87
 
88
+ </details>
89
+
29
90
  <p align="center">
30
- <sub>🧪 <strong>新功能:</strong> <a href="docs/experimental-workflow.md">实验性工作流(OPSX)</a> — 以 schema 驱动、可定制、可流动。无需改代码即可迭代工作流。</sub>
91
+ <sub>🧪 <strong>新功能:</strong> <a href="docs/opsx.md">OPSX 工作流</a> — 以 schema 驱动、可定制、可流动。无需改代码即可迭代工作流。</sub>
31
92
  </p>
32
93
 
33
94
  # OpenSpec
@@ -159,12 +220,12 @@ openspec --version
159
220
 
160
221
  无需安装,直接运行 OpenSpec:
161
222
  ```bash
162
- nix run github:Fission-AI/OpenSpec -- init
223
+ nix run github:xiangagou163/OpenSpec-cn -- init
163
224
  ```
164
225
 
165
226
  或安装到你的 profile:
166
227
  ```bash
167
- nix profile install github:Fission-AI/OpenSpec
228
+ nix profile install github:xiangagou163/OpenSpec-cn
168
229
  ```
169
230
 
170
231
  或在 `flake.nix` 中加入开发环境:
@@ -172,7 +233,7 @@ nix profile install github:Fission-AI/OpenSpec
172
233
  {
173
234
  inputs = {
174
235
  nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
175
- openspec.url = "github:Fission-AI/OpenSpec";
236
+ openspec.url = "github:xiangagou163/OpenSpec-cn";
176
237
  };
177
238
 
178
239
  outputs = { nixpkgs, openspec, ... }: {
@@ -190,13 +251,9 @@ openspec --version
190
251
 
191
252
  #### 第二步:在项目中初始化 OpenSpec
192
253
 
193
- 进入你的项目目录:
194
- ```bash
195
- cd my-project
196
- ```
197
-
198
- 运行初始化:
254
+ 进入你的项目目录并运行初始化:
199
255
  ```bash
256
+ cd your-project
200
257
  openspec init
201
258
  ```
202
259
 
@@ -210,13 +267,20 @@ openspec init
210
267
  - 运行 `openspec list` 验证设置并查看活跃变更
211
268
  - 如果编码助手没有立刻显示命令,请重启。命令在启动时加载,重新启动即可出现。
212
269
 
270
+ 告诉你的 AI:`/opsx:new <你要构建的内容>`
271
+
272
+ > [!NOTE]
273
+ > 不确定工具是否支持?查看 [支持工具清单](docs/supported-tools.md) – 已支持 20+ 工具并持续增加。
274
+ >
275
+ > 也支持 pnpm、yarn、bun 与 nix。详见 [安装选项](docs/installation.md)。
276
+
213
277
  ### 可选:补充项目上下文
214
278
 
215
279
  `openspec init` 完成后,你会看到一段建议提示,用于补充项目上下文:
216
280
 
217
281
  ```text
218
- Populate your project context:
219
- "Please read openspec/project.md and help me fill it out with details about my project, tech stack, and conventions"
282
+ 补充你的项目上下文:
283
+ "请阅读 openspec/project.md,并帮我填写项目细节、技术栈与约定"
220
284
  ```
221
285
 
222
286
  使用 `openspec/project.md` 定义项目级规范、标准、架构模式以及在所有变更中应遵循的准则。
@@ -407,10 +471,10 @@ OpenSpec 将单个功能的所有变更收拢到一个目录(`openspec/changes
407
471
 
408
472
  1. **升级包**
409
473
  ```bash
410
- npm install -g openspec-cn@latest
474
+ npm install -g openspec-cn@latest
411
475
  ```
412
476
  2. **刷新代理指令**
413
- - 在每个项目内运行 `openspec update`,重新生成 AI 指引并确保最新命令生效。
477
+ - 在每个项目内运行 `openspec update`,重新生成 AI 指引并确保最新命令生效。
414
478
 
415
479
  ## 实验性功能
416
480
 
@@ -446,27 +510,47 @@ npm install -g openspec-cn@latest
446
510
 
447
511
  **启用:** `openspec experimental`
448
512
 
449
- [完整文档 →](docs/experimental-workflow.md)
513
+ [完整文档 →](docs/opsx.md)
450
514
 
451
515
  </details>
452
516
 
453
- <details>
454
- <summary><strong>遥测</strong> – OpenSpec 收集匿名使用统计(可退出:<code>OPENSPEC_TELEMETRY=0</code>)</summary>
517
+ ## 使用注意事项
455
518
 
456
- 我们只收集命令名与版本号用于理解使用模式,不含参数、路径、内容或个人信息。CI 中会自动关闭。
519
+ **模型选择**:OpenSpec 在高推理模型上表现更好。建议 Opus 4.5 与 GPT 5.2 用于规划与实现。
457
520
 
458
- **退出:** `export OPENSPEC_TELEMETRY=0` 或 `export DO_NOT_TRACK=1`
459
-
460
- </details>
521
+ **上下文卫生**:在开始实现前清理上下文,过程中保持良好上下文卫生。
461
522
 
462
523
  ## 参与贡献
463
524
 
525
+ **小改动** — 修复 Bug、改错别字或小改进可直接提交 PR。
526
+
527
+ **大改动** — 新功能、较大重构或架构变更请先提交 OpenSpec 变更提案,先对齐意图与目标再实现。
528
+
529
+ 撰写提案时请牢记 OpenSpec 的理念:服务于不同编码助手、模型与使用场景,改动应对所有人友好。
530
+
531
+ **欢迎 AI 生成代码** — 但需经过测试与验证。PR 中请注明使用的编码助手与模型(例如:“Generated with Claude Code using claude-opus-4-5-20251101”)。
532
+
533
+ ### 开发
534
+
464
535
  - 安装依赖:`pnpm install`
465
536
  - 构建:`pnpm run build`
466
537
  - 测试:`pnpm test`
467
538
  - 本地开发 CLI:`pnpm run dev` 或 `pnpm run dev:cli`
468
539
  - 规范化提交(单行):`type(scope): subject`
469
540
 
541
+ ## 其他
542
+
543
+ <details>
544
+ <summary><strong>遥测</strong></summary>
545
+
546
+ OpenSpec 收集匿名使用统计。
547
+
548
+ 我们只收集命令名与版本号用于理解使用模式,不含参数、路径、内容或个人信息。CI 中会自动关闭。
549
+
550
+ **退出:** `export OPENSPEC_TELEMETRY=0` 或 `export DO_NOT_TRACK=1`
551
+
552
+ </details>
553
+
470
554
  <details>
471
555
  <summary><strong>维护者与顾问</strong></summary>
472
556
 
@@ -476,4 +560,4 @@ npm install -g openspec-cn@latest
476
560
 
477
561
  ## 许可证
478
562
 
479
- MIT
563
+ MIT
package/bin/openspec.js CHANGED
@@ -1,3 +1,3 @@
1
- #!/usr/bin/env node
2
-
1
+ #!/usr/bin/env node
2
+
3
3
  import '../dist/cli/index.js';
@@ -59,10 +59,10 @@ function generateMetadata() {
59
59
  const version = getVersion();
60
60
  const platform = getPlatform();
61
61
  const timestamp = getTimestamp();
62
- return `---
63
- Submitted via OpenSpec CLI
64
- - Version: ${version}
65
- - Platform: ${platform}
62
+ return `---
63
+ Submitted via OpenSpec CLI
64
+ - Version: ${version}
65
+ - Platform: ${platform}
66
66
  - Timestamp: ${timestamp}`;
67
67
  }
68
68
  /**
@@ -795,74 +795,74 @@ export function registerSchemaCommand(program) {
795
795
  function createDefaultTemplate(artifactId) {
796
796
  switch (artifactId) {
797
797
  case 'proposal':
798
- return `## Why
799
-
800
- <!-- Describe the motivation for this change -->
801
-
802
- ## What Changes
803
-
804
- <!-- Describe what will change -->
805
-
806
- ## Capabilities
807
-
808
- ### New Capabilities
809
- <!-- List new capabilities -->
810
-
811
- ### Modified Capabilities
812
- <!-- List modified capabilities -->
813
-
814
- ## Impact
815
-
816
- <!-- Describe the impact on existing functionality -->
798
+ return `## Why
799
+
800
+ <!-- Describe the motivation for this change -->
801
+
802
+ ## What Changes
803
+
804
+ <!-- Describe what will change -->
805
+
806
+ ## Capabilities
807
+
808
+ ### New Capabilities
809
+ <!-- List new capabilities -->
810
+
811
+ ### Modified Capabilities
812
+ <!-- List modified capabilities -->
813
+
814
+ ## Impact
815
+
816
+ <!-- Describe the impact on existing functionality -->
817
817
  `;
818
818
  case 'specs':
819
- return `## ADDED Requirements
820
-
821
- ### Requirement: Example requirement
822
-
823
- Description of the requirement.
824
-
825
- #### Scenario: Example scenario
826
- - **WHEN** some condition
827
- - **THEN** some outcome
819
+ return `## ADDED Requirements
820
+
821
+ ### Requirement: Example requirement
822
+
823
+ Description of the requirement.
824
+
825
+ #### Scenario: Example scenario
826
+ - **WHEN** some condition
827
+ - **THEN** some outcome
828
828
  `;
829
829
  case 'design':
830
- return `## Context
831
-
832
- <!-- Background and context -->
833
-
834
- ## Goals / Non-Goals
835
-
836
- **Goals:**
837
- <!-- List goals -->
838
-
839
- **Non-Goals:**
840
- <!-- List non-goals -->
841
-
842
- ## Decisions
843
-
844
- ### 1. Decision Name
845
-
846
- Description and rationale.
847
-
848
- **Alternatives considered:**
849
- - Alternative 1: Rejected because...
850
-
851
- ## Risks / Trade-offs
852
-
853
- <!-- List risks and trade-offs -->
830
+ return `## Context
831
+
832
+ <!-- Background and context -->
833
+
834
+ ## Goals / Non-Goals
835
+
836
+ **Goals:**
837
+ <!-- List goals -->
838
+
839
+ **Non-Goals:**
840
+ <!-- List non-goals -->
841
+
842
+ ## Decisions
843
+
844
+ ### 1. Decision Name
845
+
846
+ Description and rationale.
847
+
848
+ **Alternatives considered:**
849
+ - Alternative 1: Rejected because...
850
+
851
+ ## Risks / Trade-offs
852
+
853
+ <!-- List risks and trade-offs -->
854
854
  `;
855
855
  case 'tasks':
856
- return `## Implementation Tasks
857
-
858
- - [ ] Task 1
859
- - [ ] Task 2
860
- - [ ] Task 3
856
+ return `## Implementation Tasks
857
+
858
+ - [ ] Task 1
859
+ - [ ] Task 2
860
+ - [ ] Task 3
861
861
  `;
862
862
  default:
863
- return `## ${artifactId}
864
-
865
- <!-- Add content here -->
863
+ return `## ${artifactId}
864
+
865
+ <!-- Add content here -->
866
866
  `;
867
867
  }
868
868
  }
@@ -15,11 +15,11 @@ export const amazonQAdapter = {
15
15
  return path.join('.amazonq', 'prompts', `opsx-${commandId}.md`);
16
16
  },
17
17
  formatFile(content) {
18
- return `---
19
- description: ${content.description}
20
- ---
21
-
22
- ${content.body}
18
+ return `---
19
+ description: ${content.description}
20
+ ---
21
+
22
+ ${content.body}
23
23
  `;
24
24
  },
25
25
  };
@@ -15,11 +15,11 @@ export const antigravityAdapter = {
15
15
  return path.join('.agent', 'workflows', `opsx-${commandId}.md`);
16
16
  },
17
17
  formatFile(content) {
18
- return `---
19
- description: ${content.description}
20
- ---
21
-
22
- ${content.body}
18
+ return `---
19
+ description: ${content.description}
20
+ ---
21
+
22
+ ${content.body}
23
23
  `;
24
24
  },
25
25
  };
@@ -15,12 +15,12 @@ export const auggieAdapter = {
15
15
  return path.join('.augment', 'commands', `opsx-${commandId}.md`);
16
16
  },
17
17
  formatFile(content) {
18
- return `---
19
- description: ${content.description}
20
- argument-hint: command arguments
21
- ---
22
-
23
- ${content.body}
18
+ return `---
19
+ description: ${content.description}
20
+ argument-hint: command arguments
21
+ ---
22
+
23
+ ${content.body}
24
24
  `;
25
25
  },
26
26
  };
@@ -36,14 +36,14 @@ export const claudeAdapter = {
36
36
  return path.join('.claude', 'commands', 'opsx', `${commandId}.md`);
37
37
  },
38
38
  formatFile(content) {
39
- return `---
40
- name: ${escapeYamlValue(content.name)}
41
- description: ${escapeYamlValue(content.description)}
42
- category: ${escapeYamlValue(content.category)}
43
- tags: ${formatTagsArray(content.tags)}
44
- ---
45
-
46
- ${content.body}
39
+ return `---
40
+ name: ${escapeYamlValue(content.name)}
41
+ description: ${escapeYamlValue(content.description)}
42
+ category: ${escapeYamlValue(content.category)}
43
+ tags: ${formatTagsArray(content.tags)}
44
+ ---
45
+
46
+ ${content.body}
47
47
  `;
48
48
  },
49
49
  };
@@ -16,11 +16,11 @@ export const clineAdapter = {
16
16
  return path.join('.clinerules', 'workflows', `opsx-${commandId}.md`);
17
17
  },
18
18
  formatFile(content) {
19
- return `# ${content.name}
20
-
21
- ${content.description}
22
-
23
- ${content.body}
19
+ return `# ${content.name}
20
+
21
+ ${content.description}
22
+
23
+ ${content.body}
24
24
  `;
25
25
  },
26
26
  };
@@ -15,13 +15,13 @@ export const codebuddyAdapter = {
15
15
  return path.join('.codebuddy', 'commands', 'opsx', `${commandId}.md`);
16
16
  },
17
17
  formatFile(content) {
18
- return `---
19
- name: ${content.name}
20
- description: "${content.description}"
21
- argument-hint: "[command arguments]"
22
- ---
23
-
24
- ${content.body}
18
+ return `---
19
+ name: ${content.name}
20
+ description: "${content.description}"
21
+ argument-hint: "[command arguments]"
22
+ ---
23
+
24
+ ${content.body}
25
25
  `;
26
26
  },
27
27
  };
@@ -15,12 +15,12 @@ export const codexAdapter = {
15
15
  return path.join('.codex', 'prompts', `opsx-${commandId}.md`);
16
16
  },
17
17
  formatFile(content) {
18
- return `---
19
- description: ${content.description}
20
- argument-hint: command arguments
21
- ---
22
-
23
- ${content.body}
18
+ return `---
19
+ description: ${content.description}
20
+ argument-hint: command arguments
21
+ ---
22
+
23
+ ${content.body}
24
24
  `;
25
25
  },
26
26
  };
@@ -15,13 +15,13 @@ export const continueAdapter = {
15
15
  return path.join('.continue', 'prompts', `opsx-${commandId}.prompt`);
16
16
  },
17
17
  formatFile(content) {
18
- return `---
19
- name: opsx-${content.id}
20
- description: ${content.description}
21
- invokable: true
22
- ---
23
-
24
- ${content.body}
18
+ return `---
19
+ name: opsx-${content.id}
20
+ description: ${content.description}
21
+ invokable: true
22
+ ---
23
+
24
+ ${content.body}
25
25
  `;
26
26
  },
27
27
  };
@@ -15,12 +15,12 @@ export const costrictAdapter = {
15
15
  return path.join('.cospec', 'openspec', 'commands', `opsx-${commandId}.md`);
16
16
  },
17
17
  formatFile(content) {
18
- return `---
19
- description: "${content.description}"
20
- argument-hint: command arguments
21
- ---
22
-
23
- ${content.body}
18
+ return `---
19
+ description: "${content.description}"
20
+ argument-hint: command arguments
21
+ ---
22
+
23
+ ${content.body}
24
24
  `;
25
25
  },
26
26
  };
@@ -16,14 +16,14 @@ export const crushAdapter = {
16
16
  },
17
17
  formatFile(content) {
18
18
  const tagsStr = content.tags.join(', ');
19
- return `---
20
- name: ${content.name}
21
- description: ${content.description}
22
- category: ${content.category}
23
- tags: [${tagsStr}]
24
- ---
25
-
26
- ${content.body}
19
+ return `---
20
+ name: ${content.name}
21
+ description: ${content.description}
22
+ category: ${content.category}
23
+ tags: [${tagsStr}]
24
+ ---
25
+
26
+ ${content.body}
27
27
  `;
28
28
  },
29
29
  };
@@ -30,14 +30,14 @@ export const cursorAdapter = {
30
30
  return path.join('.cursor', 'commands', `opsx-${commandId}.md`);
31
31
  },
32
32
  formatFile(content) {
33
- return `---
34
- name: /opsx-${content.id}
35
- id: opsx-${content.id}
36
- category: ${escapeYamlValue(content.category)}
37
- description: ${escapeYamlValue(content.description)}
38
- ---
39
-
40
- ${content.body}
33
+ return `---
34
+ name: /opsx-${content.id}
35
+ id: opsx-${content.id}
36
+ category: ${escapeYamlValue(content.category)}
37
+ description: ${escapeYamlValue(content.description)}
38
+ ---
39
+
40
+ ${content.body}
41
41
  `;
42
42
  },
43
43
  };