@fission-ai/openspec 1.6.0 → 1.8.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 (208) hide show
  1. package/README.md +31 -2
  2. package/dist/cli/index.js +79 -8
  3. package/dist/commands/change.d.ts +0 -1
  4. package/dist/commands/change.js +105 -51
  5. package/dist/commands/config.js +14 -8
  6. package/dist/commands/doctor.js +9 -4
  7. package/dist/commands/feedback.js +74 -23
  8. package/dist/commands/schema.js +110 -31
  9. package/dist/commands/show.js +5 -2
  10. package/dist/commands/spec.js +49 -29
  11. package/dist/commands/validate.js +20 -5
  12. package/dist/commands/workflow/index.d.ts +1 -1
  13. package/dist/commands/workflow/index.js +1 -1
  14. package/dist/commands/workflow/instructions.d.ts +7 -1
  15. package/dist/commands/workflow/instructions.js +121 -33
  16. package/dist/commands/workflow/shared.d.ts +13 -2
  17. package/dist/commands/workflow/shared.js +34 -4
  18. package/dist/commands/workflow/status.js +9 -4
  19. package/dist/commands/workflow/templates.js +15 -5
  20. package/dist/core/archive.d.ts +14 -1
  21. package/dist/core/archive.js +1332 -155
  22. package/dist/core/artifact-graph/graph.d.ts +16 -0
  23. package/dist/core/artifact-graph/graph.js +30 -6
  24. package/dist/core/artifact-graph/index.d.ts +1 -1
  25. package/dist/core/artifact-graph/index.js +1 -1
  26. package/dist/core/artifact-graph/instruction-loader.d.ts +30 -3
  27. package/dist/core/artifact-graph/instruction-loader.js +70 -12
  28. package/dist/core/artifact-graph/outputs.d.ts +1 -0
  29. package/dist/core/artifact-graph/outputs.js +67 -5
  30. package/dist/core/artifact-graph/resolver.d.ts +14 -0
  31. package/dist/core/artifact-graph/resolver.js +69 -15
  32. package/dist/core/artifact-graph/types.js +21 -3
  33. package/dist/core/available-tools.d.ts +2 -2
  34. package/dist/core/available-tools.js +14 -3
  35. package/dist/core/change-metadata/schema.d.ts +2 -0
  36. package/dist/core/change-metadata/schema.js +13 -0
  37. package/dist/core/change-status-policy.d.ts +1 -1
  38. package/dist/core/change-status-policy.js +2 -2
  39. package/dist/core/command-generation/adapters/amazon-q.d.ts +4 -0
  40. package/dist/core/command-generation/adapters/amazon-q.js +7 -1
  41. package/dist/core/command-generation/adapters/antigravity.js +2 -1
  42. package/dist/core/command-generation/adapters/auggie.js +2 -1
  43. package/dist/core/command-generation/adapters/bob.d.ts +5 -1
  44. package/dist/core/command-generation/adapters/bob.js +6 -5
  45. package/dist/core/command-generation/adapters/claude.js +1 -8
  46. package/dist/core/command-generation/adapters/codebuddy.js +3 -2
  47. package/dist/core/command-generation/adapters/continue.js +3 -2
  48. package/dist/core/command-generation/adapters/costrict.js +2 -1
  49. package/dist/core/command-generation/adapters/crush.js +5 -5
  50. package/dist/core/command-generation/adapters/cursor.js +2 -2
  51. package/dist/core/command-generation/adapters/devin.d.ts +19 -0
  52. package/dist/core/command-generation/adapters/devin.js +36 -0
  53. package/dist/core/command-generation/adapters/factory.js +2 -1
  54. package/dist/core/command-generation/adapters/gemini.js +37 -2
  55. package/dist/core/command-generation/adapters/github-copilot.js +2 -1
  56. package/dist/core/command-generation/adapters/iflow.js +5 -4
  57. package/dist/core/command-generation/adapters/index.d.ts +2 -2
  58. package/dist/core/command-generation/adapters/index.js +2 -2
  59. package/dist/core/command-generation/adapters/junie.js +2 -1
  60. package/dist/core/command-generation/adapters/kiro.js +2 -1
  61. package/dist/core/command-generation/adapters/lingma.js +5 -5
  62. package/dist/core/command-generation/adapters/oh-my-pi.d.ts +2 -2
  63. package/dist/core/command-generation/adapters/oh-my-pi.js +3 -5
  64. package/dist/core/command-generation/adapters/opencode.js +3 -5
  65. package/dist/core/command-generation/adapters/pi.d.ts +2 -2
  66. package/dist/core/command-generation/adapters/pi.js +3 -6
  67. package/dist/core/command-generation/adapters/qoder.js +5 -5
  68. package/dist/core/command-generation/adapters/qwen.d.ts +7 -3
  69. package/dist/core/command-generation/adapters/qwen.js +12 -7
  70. package/dist/core/command-generation/adapters/roocode.d.ts +4 -4
  71. package/dist/core/command-generation/adapters/roocode.js +4 -4
  72. package/dist/core/command-generation/adapters/trae.js +1 -21
  73. package/dist/core/command-generation/adapters/zcode.d.ts +16 -0
  74. package/dist/core/command-generation/adapters/zcode.js +33 -0
  75. package/dist/core/command-generation/generator.d.ts +8 -0
  76. package/dist/core/command-generation/generator.js +15 -1
  77. package/dist/core/command-generation/index.d.ts +1 -1
  78. package/dist/core/command-generation/index.js +1 -1
  79. package/dist/core/command-generation/invocation.d.ts +73 -0
  80. package/dist/core/command-generation/invocation.js +77 -0
  81. package/dist/core/command-generation/registry.js +4 -4
  82. package/dist/core/command-generation/types.d.ts +9 -2
  83. package/dist/core/command-generation/yaml.d.ts +20 -6
  84. package/dist/core/command-generation/yaml.js +31 -21
  85. package/dist/core/command-surface.d.ts +15 -0
  86. package/dist/core/command-surface.js +33 -0
  87. package/dist/core/completions/command-registry.js +16 -2
  88. package/dist/core/completions/generators/powershell-generator.js +15 -8
  89. package/dist/core/completions/installers/zsh-installer.d.ts +9 -0
  90. package/dist/core/completions/installers/zsh-installer.js +20 -4
  91. package/dist/core/config-prompts.d.ts +1 -1
  92. package/dist/core/config-prompts.js +14 -1
  93. package/dist/core/config-schema.d.ts +10 -1
  94. package/dist/core/config-schema.js +67 -1
  95. package/dist/core/config.d.ts +15 -0
  96. package/dist/core/config.js +45 -5
  97. package/dist/core/file-state.js +56 -24
  98. package/dist/core/github-copilot/cloud-agent.d.ts +95 -0
  99. package/dist/core/github-copilot/cloud-agent.js +497 -0
  100. package/dist/core/global-config.d.ts +16 -0
  101. package/dist/core/init.d.ts +58 -0
  102. package/dist/core/init.js +450 -69
  103. package/dist/core/legacy-cleanup.d.ts +59 -0
  104. package/dist/core/legacy-cleanup.js +253 -24
  105. package/dist/core/list.js +5 -7
  106. package/dist/core/migration.d.ts +73 -1
  107. package/dist/core/migration.js +360 -11
  108. package/dist/core/onboarding-commands.d.ts +30 -0
  109. package/dist/core/onboarding-commands.js +38 -0
  110. package/dist/core/parsers/change-parser.d.ts +17 -2
  111. package/dist/core/parsers/change-parser.js +33 -20
  112. package/dist/core/parsers/code-fence.d.ts +15 -0
  113. package/dist/core/parsers/code-fence.js +49 -0
  114. package/dist/core/parsers/markdown-parser.js +2 -1
  115. package/dist/core/parsers/requirement-blocks.d.ts +18 -0
  116. package/dist/core/parsers/requirement-blocks.js +120 -35
  117. package/dist/core/parsers/requirement-text.d.ts +1 -8
  118. package/dist/core/parsers/requirement-text.js +4 -42
  119. package/dist/core/parsers/spec-structure.d.ts +1 -1
  120. package/dist/core/parsers/spec-structure.js +20 -30
  121. package/dist/core/profile-sync-drift.d.ts +0 -8
  122. package/dist/core/profile-sync-drift.js +48 -49
  123. package/dist/core/project-config.d.ts +28 -6
  124. package/dist/core/project-config.js +108 -8
  125. package/dist/core/references.js +42 -4
  126. package/dist/core/relationship-health.d.ts +8 -0
  127. package/dist/core/relationship-health.js +13 -0
  128. package/dist/core/root-selection.d.ts +9 -6
  129. package/dist/core/root-selection.js +42 -5
  130. package/dist/core/shared/index.d.ts +1 -0
  131. package/dist/core/shared/index.js +1 -0
  132. package/dist/core/shared/skill-content-equivalence.d.ts +7 -0
  133. package/dist/core/shared/skill-content-equivalence.js +41 -0
  134. package/dist/core/shared/skill-paths.d.ts +13 -0
  135. package/dist/core/shared/skill-paths.js +23 -0
  136. package/dist/core/shared/tool-detection.d.ts +25 -5
  137. package/dist/core/shared/tool-detection.js +166 -36
  138. package/dist/core/shared-skill-target.d.ts +16 -0
  139. package/dist/core/shared-skill-target.js +156 -0
  140. package/dist/core/specs-apply.d.ts +80 -33
  141. package/dist/core/specs-apply.js +659 -171
  142. package/dist/core/store/git.d.ts +13 -0
  143. package/dist/core/store/git.js +24 -0
  144. package/dist/core/templates/skill-templates.d.ts +1 -1
  145. package/dist/core/templates/skill-templates.js +1 -1
  146. package/dist/core/templates/workflows/apply-change.d.ts +10 -0
  147. package/dist/core/templates/workflows/apply-change.js +48 -158
  148. package/dist/core/templates/workflows/archive-change.js +170 -42
  149. package/dist/core/templates/workflows/bulk-archive-change.js +256 -75
  150. package/dist/core/templates/workflows/continue-change.js +38 -46
  151. package/dist/core/templates/workflows/explore.js +54 -18
  152. package/dist/core/templates/workflows/ff-change.js +46 -30
  153. package/dist/core/templates/workflows/new-change.js +2 -2
  154. package/dist/core/templates/workflows/onboard.js +13 -7
  155. package/dist/core/templates/workflows/propose.js +116 -46
  156. package/dist/core/templates/workflows/store-selection.d.ts +1 -1
  157. package/dist/core/templates/workflows/store-selection.js +1 -1
  158. package/dist/core/templates/workflows/sync-specs.js +260 -32
  159. package/dist/core/templates/workflows/update-change.js +26 -16
  160. package/dist/core/templates/workflows/verify-change.js +16 -10
  161. package/dist/core/update.d.ts +40 -5
  162. package/dist/core/update.js +389 -93
  163. package/dist/core/validation/constants.d.ts +4 -1
  164. package/dist/core/validation/constants.js +4 -1
  165. package/dist/core/validation/validator.d.ts +22 -8
  166. package/dist/core/validation/validator.js +222 -50
  167. package/dist/core/version-check.d.ts +152 -0
  168. package/dist/core/version-check.js +731 -0
  169. package/dist/core/view.js +12 -17
  170. package/dist/prompts/searchable-multi-select.js +1 -1
  171. package/dist/telemetry/config.d.ts +3 -4
  172. package/dist/telemetry/index.d.ts +10 -5
  173. package/dist/telemetry/index.js +75 -41
  174. package/dist/ui/welcome-screen.d.ts +9 -1
  175. package/dist/ui/welcome-screen.js +91 -38
  176. package/dist/utils/change-metadata.d.ts +43 -0
  177. package/dist/utils/change-metadata.js +123 -7
  178. package/dist/utils/change-utils.d.ts +10 -4
  179. package/dist/utils/change-utils.js +20 -13
  180. package/dist/utils/ci.d.ts +12 -0
  181. package/dist/utils/ci.js +16 -0
  182. package/dist/utils/command-references.d.ts +92 -6
  183. package/dist/utils/command-references.js +180 -7
  184. package/dist/utils/date.d.ts +8 -0
  185. package/dist/utils/date.js +13 -0
  186. package/dist/utils/file-system.d.ts +10 -0
  187. package/dist/utils/file-system.js +70 -0
  188. package/dist/utils/index.d.ts +1 -1
  189. package/dist/utils/index.js +1 -1
  190. package/dist/utils/interactive.d.ts +23 -0
  191. package/dist/utils/interactive.js +32 -0
  192. package/dist/utils/item-discovery.d.ts +19 -0
  193. package/dist/utils/item-discovery.js +30 -48
  194. package/dist/utils/shell-detection.d.ts +1 -1
  195. package/dist/utils/shell-detection.js +64 -11
  196. package/dist/utils/spec-discovery.d.ts +40 -0
  197. package/dist/utils/spec-discovery.js +115 -0
  198. package/dist/utils/task-progress.d.ts +17 -0
  199. package/dist/utils/task-progress.js +41 -13
  200. package/package.json +14 -12
  201. package/schemas/spec-driven/schema.yaml +67 -10
  202. package/schemas/spec-driven/templates/design.md +2 -2
  203. package/schemas/spec-driven/templates/proposal.md +10 -4
  204. package/schemas/spec-driven/templates/spec.md +3 -0
  205. package/dist/core/command-generation/adapters/codex.d.ts +0 -16
  206. package/dist/core/command-generation/adapters/codex.js +0 -39
  207. package/dist/core/command-generation/adapters/windsurf.d.ts +0 -14
  208. package/dist/core/command-generation/adapters/windsurf.js +0 -38
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fission-ai/openspec",
3
- "version": "1.6.0",
3
+ "version": "1.8.0",
4
4
  "description": "AI-native system for spec-driven development",
5
5
  "keywords": [
6
6
  "openspec",
@@ -42,30 +42,32 @@
42
42
  "node": ">=20.19.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@changesets/changelog-github": "^0.5.2",
46
- "@changesets/cli": "^2.27.7",
47
- "@types/node": "^24.2.0",
45
+ "@changesets/changelog-github": "^0.7.0",
46
+ "@changesets/cli": "^2.31.1",
47
+ "@types/node": "^20.19.43",
48
48
  "@vitest/ui": "^3.2.6",
49
- "eslint": "^9.39.2",
50
- "typescript": "^5.9.3",
51
- "typescript-eslint": "^8.62.0",
49
+ "eslint": "^10.5.0",
50
+ "smol-toml": "^1.7.1",
51
+ "typescript": "^6.0.3",
52
+ "typescript-eslint": "^8.65.0",
52
53
  "vitest": "^3.2.6"
53
54
  },
54
55
  "dependencies": {
55
56
  "@inquirer/core": "^10.3.2",
56
57
  "@inquirer/prompts": "^7.10.1",
57
- "chalk": "^5.5.0",
58
+ "chalk": "^5.6.2",
58
59
  "commander": "^14.0.0",
59
60
  "cross-spawn": "7.0.6",
60
61
  "fast-glob": "^3.3.3",
61
- "ora": "^8.2.0",
62
- "posthog-node": "^5.20.0",
63
- "yaml": "^2.8.2",
64
- "zod": "^4.0.17"
62
+ "ora": "^9.4.1",
63
+ "yaml": "^2.8.3",
64
+ "zod": "^4.4.3"
65
65
  },
66
66
  "scripts": {
67
67
  "lint": "eslint src/",
68
68
  "build": "node build.js",
69
+ "generate:skills": "node scripts/generate-skillssh.mjs",
70
+ "regen:parity-hashes": "node scripts/regen-parity-hashes.mjs",
69
71
  "dev": "tsc --watch",
70
72
  "dev:cli": "pnpm build && node bin/openspec.js",
71
73
  "test": "vitest run",
@@ -13,14 +13,22 @@ artifacts:
13
13
  - **Why**: 1-2 sentences on the problem or opportunity. What problem does this solve? Why now?
14
14
  - **What Changes**: Bullet list of changes. Be specific about new capabilities, modifications, or removals. Mark breaking changes with **BREAKING**.
15
15
  - **Capabilities**: Identify which specs will be created or modified:
16
- - **New Capabilities**: List capabilities being introduced. Each becomes a new `specs/<name>/spec.md`. Use kebab-case names (e.g., `user-auth`, `data-export`).
17
- - **Modified Capabilities**: List existing capabilities whose REQUIREMENTS are changing. Only include if spec-level behavior changes (not just implementation details). Each needs a delta spec file. Check `openspec/specs/` for existing spec names. Leave empty if no requirement changes.
16
+ - **New Capabilities**: List capabilities being introduced. Each becomes a new `specs/<capability-path>/spec.md`. Use kebab-case for path segments you introduce (e.g., `user-auth` or `identity/user-auth`) and follow the project's existing spec organization.
17
+ - **Modified Capabilities**: List existing capabilities whose REQUIREMENTS are changing. Only include if spec-level behavior changes (not just implementation details). Each needs a delta spec file. Use the exact existing path under `openspec/specs/`. Leave empty if no requirement changes.
18
18
  - **Impact**: Affected code, APIs, dependencies, or systems.
19
19
 
20
20
  IMPORTANT: The Capabilities section is critical. It creates the contract between
21
21
  proposal and specs phases. Research existing specs before filling this in.
22
22
  Each capability listed here will need a corresponding spec file.
23
23
 
24
+ Every change must either declare at least one capability (new or
25
+ modified) or explicitly opt out of specs: `openspec validate` rejects a
26
+ change with zero deltas unless the change's `.openspec.yaml` sets
27
+ `skip_specs: true`. Use `skip_specs: true` only when no spec-level
28
+ behavior changes (pure refactor, tooling, docs) - specs describe
29
+ behavior, so if behavior does not change, no spec should change either.
30
+ Do not invent a requirement just to satisfy validation.
31
+
24
32
  Keep it concise (1-2 pages). Focus on the "why" not the "how" -
25
33
  implementation details belong in design.md.
26
34
 
@@ -34,9 +42,33 @@ artifacts:
34
42
  instruction: |
35
43
  Create specification files that define WHAT the system should do.
36
44
 
45
+ A spec is a behavior contract, not an implementation plan.
46
+
47
+ Good spec content:
48
+ - Observable behavior users or downstream systems rely on
49
+ - Inputs, outputs, and error conditions
50
+ - External constraints (security, privacy, reliability, compatibility)
51
+ - Scenarios that can be tested or explicitly validated
52
+
53
+ Avoid in specs:
54
+ - Internal class/function names
55
+ - Library or framework choices
56
+ - Step-by-step implementation details
57
+ - Detailed execution plans (those belong in design.md or tasks.md)
58
+
59
+ Quick test: if the implementation can change without changing externally
60
+ visible behavior, it likely does not belong in the spec.
61
+
37
62
  Create one spec file per capability listed in the proposal's Capabilities section.
38
- - New capabilities: use the exact kebab-case name from the proposal (specs/<capability>/spec.md).
39
- - Modified capabilities: use the existing spec folder name from openspec/specs/<capability>/ when creating the delta spec at specs/<capability>/spec.md.
63
+ `<capability-path>` is the spec directory relative to `specs/` (for example,
64
+ `user-auth` or `identity/user-auth`). Preserve the full path:
65
+ - New capabilities: use the exact path from the proposal at `specs/<capability-path>/spec.md`. Any path segment newly introduced in the proposal must be kebab-case. Follow the project's existing organization; do not add a new domain level when the project uses a flat layout.
66
+ - Modified capabilities: use the exact existing path from `openspec/specs/<capability-path>/` when creating the delta at `specs/<capability-path>/spec.md`. Do not move or rename the capability.
67
+
68
+ There must be at least one spec file unless the change's `.openspec.yaml`
69
+ sets `skip_specs: true` (no spec-level behavior change) - `openspec validate`
70
+ rejects a zero-delta change without that marker. If the proposal lists no
71
+ capabilities and `skip_specs` is not set, revisit the proposal first.
40
72
 
41
73
  Delta operations (use ## headers):
42
74
  - **ADDED Requirements**: New capabilities
@@ -51,8 +83,18 @@ artifacts:
51
83
  - **CRITICAL**: Scenarios MUST use exactly 4 hashtags (`####`). Using 3 hashtags or bullets will fail silently.
52
84
  - Every requirement MUST have at least one scenario.
53
85
 
86
+ New capabilities only: start the delta spec with a `## Purpose` section -
87
+ one or two sentences (50+ characters, or `openspec validate --strict`
88
+ reports it as too brief) describing what the capability is for. Archive
89
+ copies it into the main spec it creates; without it the new main spec is
90
+ left with a `TBD ... Update Purpose after archive` placeholder to fill in
91
+ by hand. Do NOT add `## Purpose` to a delta for an existing capability -
92
+ that spec already has one and the delta's is ignored. To change an
93
+ existing capability's Purpose - including a leftover `TBD` placeholder -
94
+ edit `openspec/specs/<capability-path>/spec.md` directly.
95
+
54
96
  MODIFIED requirements workflow:
55
- 1. Locate the existing requirement in openspec/specs/<capability>/spec.md
97
+ 1. Locate the existing requirement in openspec/specs/<capability-path>/spec.md
56
98
  2. Copy the ENTIRE requirement block (from `### Requirement:` through all scenarios)
57
99
  3. Paste under `## MODIFIED Requirements` and edit to reflect new behavior
58
100
  4. Ensure header text matches exactly (whitespace-insensitive)
@@ -60,8 +102,12 @@ artifacts:
60
102
  Common pitfall: Using MODIFIED with partial content loses detail at archive time.
61
103
  If adding new concerns without changing existing behavior, use ADDED instead.
62
104
 
63
- Example:
105
+ Example (a new capability, so it opens with `## Purpose`):
64
106
  ```
107
+ ## Purpose
108
+
109
+ Lets users take their data out of the product in a portable format.
110
+
65
111
  ## ADDED Requirements
66
112
 
67
113
  ### Requirement: User can export data
@@ -96,15 +142,22 @@ artifacts:
96
142
  - Ambiguity that benefits from technical decisions before coding
97
143
 
98
144
  Sections:
99
- - **Context**: Background, current state, constraints, stakeholders
100
- - **Goals / Non-Goals**: What this design achieves and explicitly excludes
145
+ - **Context**: Only the current state and constraints needed to explain the approach. Reference the proposal for motivation instead of restating it (e.g., "See proposal.md - Why").
146
+ - **Goals / Non-Goals**: What this design achieves and explicitly excludes. Don't restate the proposal's scope - add only design-level boundaries.
101
147
  - **Decisions**: Key technical choices with rationale (why X over Y?). Include alternatives considered for each decision.
102
148
  - **Risks / Trade-offs**: Known limitations, things that could go wrong. Format: [Risk] → Mitigation
103
149
  - **Migration Plan**: Steps to deploy, rollback strategy (if applicable)
104
- - **Open Questions**: Outstanding decisions or unknowns to resolve
150
+ - **Open Questions**: Unknowns that can safely be answered later without
151
+ changing the specs, the approach, or the task breakdown. Omit if none.
152
+
153
+ Open questions are for genuinely deferrable unknowns, not decisions you
154
+ skipped. If a question would change the specs, the chosen approach, or
155
+ the task breakdown, resolve it now - ask the user instead of guessing.
105
156
 
106
157
  Focus on architecture and approach, not line-by-line implementation.
107
- Reference the proposal for motivation and specs for requirements.
158
+ The proposal covers why and what; design covers how. Reference the
159
+ proposal for motivation and, once written, the specs for requirements -
160
+ if a section would only restate them, point to them instead.
108
161
 
109
162
  Good design docs explain the "why" behind technical decisions.
110
163
  requires:
@@ -117,6 +170,10 @@ artifacts:
117
170
  instruction: |
118
171
  Create the task list that breaks down the implementation work.
119
172
 
173
+ Before writing tasks, check design.md for Open Questions. If any of them
174
+ would change what gets built, resolve them with the user first - do not
175
+ bake an unstated assumption into the task list.
176
+
120
177
  **IMPORTANT: Follow the template below exactly.** The apply phase parses
121
178
  checkbox format to track progress. Tasks not using `- [ ]` won't be tracked.
122
179
 
@@ -1,6 +1,6 @@
1
1
  ## Context
2
2
 
3
- <!-- Background and current state -->
3
+ <!-- Current state and constraints that shape the approach. See proposal.md for motivation - don't restate it -->
4
4
 
5
5
  ## Goals / Non-Goals
6
6
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  ## Decisions
14
14
 
15
- <!-- Key design decisions and rationale -->
15
+ <!-- Key design decisions with rationale and alternatives considered -->
16
16
 
17
17
  ## Risks / Trade-offs
18
18
 
@@ -9,14 +9,20 @@
9
9
  ## Capabilities
10
10
 
11
11
  ### New Capabilities
12
- <!-- Capabilities being introduced. Replace <name> with kebab-case identifier (e.g., user-auth, data-export, api-rate-limiting). Each creates specs/<name>/spec.md -->
13
- - `<name>`: <brief description of what this capability covers>
12
+ <!-- Capabilities being introduced. Use kebab-case for path segments you introduce
13
+ (e.g., user-auth or identity/user-auth) that follow the project's existing
14
+ spec organization. Each creates specs/<capability-path>/spec.md. -->
15
+ - `<capability-path>`: <brief description of what this capability covers>
14
16
 
15
17
  ### Modified Capabilities
16
18
  <!-- Existing capabilities whose REQUIREMENTS are changing (not just implementation).
17
19
  Only list here if spec-level behavior changes. Each needs a delta spec file.
18
- Use existing spec names from openspec/specs/. Leave empty if no requirement changes. -->
19
- - `<existing-name>`: <what requirement is changing>
20
+ Use the exact existing path under openspec/specs/. Leave empty if no requirement
21
+ changes. A change with no capabilities at all (pure refactor, tooling, docs)
22
+ must set `skip_specs: true` in its .openspec.yaml - openspec validate rejects
23
+ a zero-delta change without that marker. Do not invent a requirement just to
24
+ satisfy validation. -->
25
+ - `<existing-capability-path>`: <what requirement is changing>
20
26
 
21
27
  ## Impact
22
28
 
@@ -1,3 +1,6 @@
1
+ ## Purpose
2
+ <!-- New capabilities only: one or two sentences (50+ characters) on what this capability is for. Delete this section for an existing capability. -->
3
+
1
4
  ## ADDED Requirements
2
5
 
3
6
  ### Requirement: <!-- requirement name -->
@@ -1,16 +0,0 @@
1
- /**
2
- * Codex Command Adapter
3
- *
4
- * Formats commands for Codex following its frontmatter specification.
5
- * Codex custom prompts live in the global home directory (~/.codex/prompts/)
6
- * and are not shared through the repository. The CODEX_HOME env var can
7
- * override the default ~/.codex location.
8
- */
9
- import type { ToolCommandAdapter } from '../types.js';
10
- /**
11
- * Codex adapter for command generation.
12
- * File path: <CODEX_HOME>/prompts/opsx-<id>.md (absolute, global)
13
- * Frontmatter: description, argument-hint
14
- */
15
- export declare const codexAdapter: ToolCommandAdapter;
16
- //# sourceMappingURL=codex.d.ts.map
@@ -1,39 +0,0 @@
1
- /**
2
- * Codex Command Adapter
3
- *
4
- * Formats commands for Codex following its frontmatter specification.
5
- * Codex custom prompts live in the global home directory (~/.codex/prompts/)
6
- * and are not shared through the repository. The CODEX_HOME env var can
7
- * override the default ~/.codex location.
8
- */
9
- import os from 'os';
10
- import path from 'path';
11
- /**
12
- * Returns the Codex home directory.
13
- * Respects the CODEX_HOME env var, defaulting to ~/.codex.
14
- */
15
- function getCodexHome() {
16
- const envHome = process.env.CODEX_HOME?.trim();
17
- return path.resolve(envHome ? envHome : path.join(os.homedir(), '.codex'));
18
- }
19
- /**
20
- * Codex adapter for command generation.
21
- * File path: <CODEX_HOME>/prompts/opsx-<id>.md (absolute, global)
22
- * Frontmatter: description, argument-hint
23
- */
24
- export const codexAdapter = {
25
- toolId: 'codex',
26
- getFilePath(commandId) {
27
- return path.join(getCodexHome(), 'prompts', `opsx-${commandId}.md`);
28
- },
29
- formatFile(content) {
30
- return `---
31
- description: ${content.description}
32
- argument-hint: command arguments
33
- ---
34
-
35
- ${content.body}
36
- `;
37
- },
38
- };
39
- //# sourceMappingURL=codex.js.map
@@ -1,14 +0,0 @@
1
- /**
2
- * Windsurf Command Adapter
3
- *
4
- * Formats commands for Windsurf following its frontmatter specification.
5
- * Windsurf uses a similar format to Claude but may have different conventions.
6
- */
7
- import type { ToolCommandAdapter } from '../types.js';
8
- /**
9
- * Windsurf adapter for command generation.
10
- * File path: .windsurf/workflows/opsx-<id>.md
11
- * Frontmatter: name, description, category, tags
12
- */
13
- export declare const windsurfAdapter: ToolCommandAdapter;
14
- //# sourceMappingURL=windsurf.d.ts.map
@@ -1,38 +0,0 @@
1
- /**
2
- * Windsurf Command Adapter
3
- *
4
- * Formats commands for Windsurf following its frontmatter specification.
5
- * Windsurf uses a similar format to Claude but may have different conventions.
6
- */
7
- import path from 'path';
8
- import { escapeYamlValue } from '../yaml.js';
9
- /**
10
- * Formats a tags array as a YAML array with proper escaping.
11
- */
12
- function formatTagsArray(tags) {
13
- const escapedTags = tags.map((tag) => escapeYamlValue(tag));
14
- return `[${escapedTags.join(', ')}]`;
15
- }
16
- /**
17
- * Windsurf adapter for command generation.
18
- * File path: .windsurf/workflows/opsx-<id>.md
19
- * Frontmatter: name, description, category, tags
20
- */
21
- export const windsurfAdapter = {
22
- toolId: 'windsurf',
23
- getFilePath(commandId) {
24
- return path.join('.windsurf', 'workflows', `opsx-${commandId}.md`);
25
- },
26
- formatFile(content) {
27
- return `---
28
- name: ${escapeYamlValue(content.name)}
29
- description: ${escapeYamlValue(content.description)}
30
- category: ${escapeYamlValue(content.category)}
31
- tags: ${formatTagsArray(content.tags)}
32
- ---
33
-
34
- ${content.body}
35
- `;
36
- },
37
- };
38
- //# sourceMappingURL=windsurf.js.map