gemiterm 2.0.0 → 2.1.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 (150) hide show
  1. package/README.md +32 -9
  2. package/package.json +13 -4
  3. package/src/cli/command-registry.ts +66 -62
  4. package/src/cli/commands/install-skills-command.ts +35 -0
  5. package/src/cli/index.ts +19 -44
  6. package/src/infrastructure/cli-parser.ts +77 -0
  7. package/src/services/skills-cli-driver.ts +58 -0
  8. package/src/services/skills-service.ts +52 -0
  9. package/.env +0 -2
  10. package/.github/workflows/manual-release.yml +0 -34
  11. package/.github/workflows/release.yml +0 -198
  12. package/.github/workflows/test.yml +0 -29
  13. package/.opencode/commands/opsx-apply.md +0 -152
  14. package/.opencode/commands/opsx-archive.md +0 -157
  15. package/.opencode/commands/opsx-explore.md +0 -169
  16. package/.opencode/commands/opsx-propose.md +0 -104
  17. package/.opencode/commands/opsx-sync.md +0 -140
  18. package/.opencode/commands/search-intelligently.md +0 -9
  19. package/.opencode/opencode.json +0 -20
  20. package/.opencode/skills/intellisearch/.version +0 -1
  21. package/.opencode/skills/intellisearch/SKILL.md +0 -84
  22. package/.opencode/skills/intellisearch/references/brave-search.md +0 -67
  23. package/.opencode/skills/intellisearch/references/ddg-search.md +0 -79
  24. package/.opencode/skills/intellisearch/references/deepwiki-tools.md +0 -246
  25. package/.opencode/skills/intellisearch/references/examples.md +0 -97
  26. package/.opencode/skills/intellisearch/references/gh-cli.md +0 -143
  27. package/.opencode/skills/intellisearch/references/google-search.md +0 -40
  28. package/.opencode/skills/intellisearch/references/search-workflow.md +0 -143
  29. package/.opencode/skills/intellisearch/references/workflow.md +0 -115
  30. package/.opencode/skills/openspec-apply-change/SKILL.md +0 -159
  31. package/.opencode/skills/openspec-archive-change/SKILL.md +0 -117
  32. package/.opencode/skills/openspec-explore/SKILL.md +0 -287
  33. package/.opencode/skills/openspec-propose/SKILL.md +0 -111
  34. package/.opencode/skills/openspec-sync-specs/SKILL.md +0 -147
  35. package/.serena/project.yml +0 -133
  36. package/AGENTS.md +0 -136
  37. package/CHANGELOG.md +0 -3
  38. package/bun.lock +0 -105
  39. package/docs/INSTALL.md +0 -185
  40. package/docs/PLAYWRIGHT_CLI_API.md +0 -306
  41. package/docs/python-release-for-reference.md +0 -175
  42. package/examples/sample_json_export.json +0 -32
  43. package/examples/sample_markdown_export.md +0 -221
  44. package/examples/usage_examples.sh +0 -222
  45. package/install.ps1 +0 -264
  46. package/install.sh +0 -275
  47. package/openspec/MAESTRO_MIGRATION.md +0 -180
  48. package/openspec/changes/archive/2026-06-08-command-spec-conformance/.openspec.yaml +0 -2
  49. package/openspec/changes/archive/2026-06-08-command-spec-conformance/design.md +0 -194
  50. package/openspec/changes/archive/2026-06-08-command-spec-conformance/proposal.md +0 -52
  51. package/openspec/changes/archive/2026-06-08-command-spec-conformance/specs/multi-profile-conversations/spec.md +0 -133
  52. package/openspec/changes/archive/2026-06-08-command-spec-conformance/tasks.md +0 -95
  53. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/.openspec.yaml +0 -2
  54. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/design.md +0 -28
  55. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/proposal.md +0 -22
  56. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/specs/interactive-prompt-loop/spec.md +0 -35
  57. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/tasks.md +0 -28
  58. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/.openspec.yaml +0 -2
  59. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/design.md +0 -323
  60. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/proposal.md +0 -122
  61. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/specs/no-capability-changes/spec.md +0 -29
  62. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/tasks.md +0 -172
  63. package/openspec/changes/archive/2026-06-09-v2-install-migration/.openspec.yaml +0 -2
  64. package/openspec/changes/archive/2026-06-09-v2-install-migration/design.md +0 -241
  65. package/openspec/changes/archive/2026-06-09-v2-install-migration/proposal.md +0 -41
  66. package/openspec/changes/archive/2026-06-09-v2-install-migration/specs/v2-installer/spec.md +0 -205
  67. package/openspec/changes/archive/2026-06-09-v2-install-migration/tasks.md +0 -97
  68. package/openspec/changes/commander-cli-parser/.openspec.yaml +0 -2
  69. package/openspec/changes/commander-cli-parser/design.md +0 -107
  70. package/openspec/changes/commander-cli-parser/proposal.md +0 -31
  71. package/openspec/changes/commander-cli-parser/specs/cli/spec.md +0 -48
  72. package/openspec/changes/commander-cli-parser/tasks.md +0 -33
  73. package/openspec/changes/cross-platform-build-and-ci/.openspec.yaml +0 -2
  74. package/openspec/changes/cross-platform-build-and-ci/design.md +0 -213
  75. package/openspec/changes/cross-platform-build-and-ci/proposal.md +0 -50
  76. package/openspec/changes/cross-platform-build-and-ci/specs/path-and-file-mediation/spec.md +0 -335
  77. package/openspec/changes/cross-platform-build-and-ci/specs/release-pipeline/spec.md +0 -95
  78. package/openspec/changes/cross-platform-build-and-ci/tasks.md +0 -164
  79. package/openspec/config.yaml +0 -20
  80. package/openspec/specs/auth/spec.md +0 -394
  81. package/openspec/specs/cli/spec.md +0 -108
  82. package/openspec/specs/commands/spec.md +0 -409
  83. package/openspec/specs/configuration/spec.md +0 -130
  84. package/openspec/specs/conversations/spec.md +0 -139
  85. package/openspec/specs/domain-model/spec.md +0 -128
  86. package/openspec/specs/formatters/spec.md +0 -158
  87. package/openspec/specs/install-browser/spec.md +0 -146
  88. package/openspec/specs/interactive-prompt-loop/spec.md +0 -41
  89. package/openspec/specs/logger/spec.md +0 -71
  90. package/openspec/specs/mediator/spec.md +0 -72
  91. package/openspec/specs/multi-profile-conversations/spec.md +0 -145
  92. package/openspec/specs/path-utils/spec.md +0 -101
  93. package/openspec/specs/profiles/spec.md +0 -94
  94. package/openspec/specs/storage/spec.md +0 -198
  95. package/openspec/specs/testing/spec.md +0 -237
  96. package/openspec/specs/v2-installer/spec.md +0 -205
  97. package/openspec/specs/validators/spec.md +0 -65
  98. package/scripts/build.ts +0 -88
  99. package/scripts/clean-build.ps1 +0 -4
  100. package/scripts/clean-build.sh +0 -5
  101. package/scripts/install-browser.ps1 +0 -5
  102. package/scripts/install-browser.sh +0 -6
  103. package/scripts/lint-path-mediation.ps1 +0 -65
  104. package/scripts/lint-path-mediation.sh +0 -40
  105. package/tests/cli/auth-command.test.ts +0 -220
  106. package/tests/cli/command-registry.test.ts +0 -67
  107. package/tests/cli/continue-command.test.ts +0 -100
  108. package/tests/cli/delete-command.test.ts +0 -128
  109. package/tests/cli/export-all-command.test.ts +0 -375
  110. package/tests/cli/install-browser-command.test.ts +0 -48
  111. package/tests/cli/list-command.test.ts +0 -179
  112. package/tests/cli/new-command.test.ts +0 -139
  113. package/tests/cli/status-command.test.ts +0 -106
  114. package/tests/core/query-handlers.test.ts +0 -187
  115. package/tests/fixtures/auth-fixtures.ts +0 -98
  116. package/tests/fixtures/chat-fixtures.ts +0 -87
  117. package/tests/infrastructure/cli-table.test.ts +0 -107
  118. package/tests/infrastructure/formatters.test.ts +0 -202
  119. package/tests/infrastructure/io.test.ts +0 -197
  120. package/tests/infrastructure/logger.test.ts +0 -74
  121. package/tests/infrastructure/storage.test.ts +0 -335
  122. package/tests/infrastructure/validators.test.ts +0 -67
  123. package/tests/integration/commands/auth.test.ts +0 -186
  124. package/tests/integration/commands/continue.test.ts +0 -130
  125. package/tests/integration/commands/delete.test.ts +0 -140
  126. package/tests/integration/commands/export.test.ts +0 -266
  127. package/tests/integration/commands/fetch.test.ts +0 -238
  128. package/tests/integration/commands/list.test.ts +0 -281
  129. package/tests/integration/commands/profile.test.ts +0 -258
  130. package/tests/integration/commands/status.test.ts +0 -223
  131. package/tests/integration/installer-script-shape.test.ts +0 -67
  132. package/tests/parity/compare-outputs.ts +0 -359
  133. package/tests/parity/test-commands-parity.ps1 +0 -82
  134. package/tests/parity/test-commands-parity.sh +0 -61
  135. package/tests/services/auth-service.test.ts +0 -315
  136. package/tests/services/cookie-monitor.test.ts +0 -229
  137. package/tests/services/cookie-storage-service.test.ts +0 -230
  138. package/tests/services/gemini-client-wrapper.test.ts +0 -688
  139. package/tests/services/install-browser-service.test.ts +0 -83
  140. package/tests/services/playwright-cli-driver.test.ts +0 -468
  141. package/tests/services/profile-auth-manager.test.ts +0 -334
  142. package/tests/services/profile-service.test.ts +0 -224
  143. package/tests/setup.ts +0 -95
  144. package/tests/smoke/smoke.test.ts +0 -52
  145. package/tests/unit/config.test.ts +0 -159
  146. package/tests/unit/errors.test.ts +0 -119
  147. package/tests/unit/formatters.test.ts +0 -316
  148. package/tests/unit/mediator.test.ts +0 -152
  149. package/tests/unit/path-utils.test.ts +0 -289
  150. package/tsconfig.json +0 -16
@@ -1,198 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- tags: ['v*']
6
- workflow_call:
7
- inputs:
8
- ref:
9
- description: 'Git ref (commit hash, branch, or tag) to build'
10
- type: string
11
- default: ${{ github.ref }}
12
- tag_name:
13
- description: 'Tag name to attach the GitHub Release to'
14
- type: string
15
- default: ${{ github.ref_name }}
16
- publish:
17
- description: 'Whether to publish to npm'
18
- type: string
19
- default: 'true'
20
- draft:
21
- description: 'Whether to create the release as a draft'
22
- type: string
23
- default: 'false'
24
- prerelease:
25
- description: 'Whether to mark the release as a pre-release'
26
- type: string
27
- default: 'true'
28
-
29
- concurrency:
30
- group: release
31
- cancel-in-progress: true
32
-
33
- permissions:
34
- contents: write
35
-
36
- jobs:
37
- build-linux:
38
- name: Build Linux
39
- runs-on: ubuntu-latest
40
- steps:
41
- - uses: actions/checkout@v4
42
- with:
43
- ref: ${{ inputs.ref || github.ref }}
44
- - uses: oven-sh/setup-bun@v2
45
- with:
46
- bun-version: 1.3.13
47
- - run: bun install --frozen-lockfile
48
- - run: bun run build:linux
49
- - name: Verify binary
50
- run: test -f dist/gemiterm
51
- - name: Fail if binary < 20MB
52
- run: |
53
- size=$(stat -c%s dist/gemiterm)
54
- minsize=$((20 * 1024 * 1024))
55
- if [ "$size" -lt "$minsize" ]; then
56
- echo "Binary too small: $size bytes (expected at least 20MB)"
57
- exit 1
58
- fi
59
- - uses: actions/upload-artifact@v4
60
- with:
61
- name: GemiTerm-linux
62
- path: dist/gemiterm
63
-
64
- build-windows:
65
- name: Build Windows
66
- runs-on: windows-latest
67
- steps:
68
- - uses: actions/checkout@v4
69
- with:
70
- ref: ${{ inputs.ref || github.ref }}
71
- - uses: oven-sh/setup-bun@v2
72
- with:
73
- bun-version: 1.3.13
74
- - run: bun install --frozen-lockfile
75
- - run: bun run build:windows
76
- - name: Verify binary
77
- run: Test-Path dist/gemiterm.exe
78
- - name: Fail if binary < 20MB
79
- shell: pwsh
80
- run: |
81
- $size = (Get-Item dist/gemiterm.exe).Length
82
- $minsize = 20 * 1024 * 1024
83
- if ($size -lt $minsize) {
84
- Write-Host "Binary too small: $size bytes (expected at least 20MB)"
85
- exit 1
86
- }
87
- - uses: actions/upload-artifact@v4
88
- with:
89
- name: GemiTerm-windows
90
- path: dist/gemiterm.exe
91
-
92
- release:
93
- name: Create GitHub Release
94
- runs-on: ubuntu-latest
95
- needs: [build-linux, build-windows]
96
- steps:
97
- - uses: actions/checkout@v4
98
- with:
99
- ref: ${{ inputs.ref || github.ref }}
100
- - uses: actions/download-artifact@v4
101
- with:
102
- name: GemiTerm-linux
103
- path: dist
104
- - uses: actions/download-artifact@v4
105
- with:
106
- name: GemiTerm-windows
107
- path: dist
108
- - name: Make Linux binary executable
109
- run: chmod +x dist/gemiterm
110
- - name: Extract CHANGELOG entry for release
111
- id: changelog
112
- run: |
113
- node -e "
114
- const version = '${TAG}'.replace(/^v/, '');
115
- const fs = require('fs');
116
- const content = fs.readFileSync('CHANGELOG.md', 'utf8');
117
- const sections = content.split(/(?=^## )/m);
118
- let found = false;
119
- let notes = '';
120
- for (const section of sections) {
121
- const m = section.match(/^## \[([^\]]+)\].*?-\s*(\d{4}-\d{2}-\d{2})/s);
122
- if (m && m[1].replace(/^v/, '') === version) {
123
- notes = section.replace(/^## \[[^\]]+\].*?-\s*\d{4}-\d{2}-\d{2}\n/, '').trim();
124
- found = true;
125
- break;
126
- }
127
- }
128
- if (!found) {
129
- console.error('No changelog section found for version:', version);
130
- process.exit(1);
131
- }
132
- fs.writeFileSync('release_body.md', notes);
133
- console.log('Extracted', notes.split('\n').length, 'lines for version', version);
134
- "
135
- env:
136
- TAG: ${{ inputs.tag_name || github.ref_name }}
137
- - name: Create GitHub Release
138
- uses: softprops/action-gh-release@v2
139
- with:
140
- tag_name: ${{ inputs.tag_name || github.ref_name }}
141
- body_path: release_body.md
142
- draft: false
143
- prerelease: ${{ contains(inputs.tag_name || github.ref_name, '-') }}
144
- env:
145
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
146
- - name: Upload Linux binary
147
- run: |
148
- TAG="${{ inputs.tag_name || github.ref_name }}"
149
- gh release upload "$TAG" dist/gemiterm --clobber || true
150
- env:
151
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
152
- - name: Upload Windows binary
153
- run: |
154
- TAG="${{ inputs.tag_name || github.ref_name }}"
155
- gh release upload "$TAG" dist/gemiterm.exe --clobber || true
156
- env:
157
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
158
- - name: Set asset labels
159
- run: |
160
- TAG="${{ inputs.tag_name || github.ref_name }}"
161
- LINUX_ASSET_ID=$(gh release view "$TAG" --json assets -q '.assets[] | select(.name == "gemiterm") | .id')
162
- if [[ -n "$LINUX_ASSET_ID" ]]; then
163
- gh api -X PATCH /repos/${{ github.repository }}/releases/assets/$LINUX_ASSET_ID \
164
- -f name='GemiTerm' \
165
- -f label="GemiTerm $TAG - Linux x64 binary" || true
166
- fi
167
- WINDOWS_ASSET_ID=$(gh release view "$TAG" --json assets -q '.assets[] | select(.name == "gemiterm.exe") | .id')
168
- if [[ -n "$WINDOWS_ASSET_ID" ]]; then
169
- gh api -X PATCH /repos/${{ github.repository }}/releases/assets/$WINDOWS_ASSET_ID \
170
- -f name='GemiTerm' \
171
- -f label="GemiTerm $TAG - Windows x64 binary" || true
172
- fi
173
- env:
174
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
175
-
176
-
177
- publish:
178
- name: Publish to npm
179
- runs-on: ubuntu-latest
180
- needs: [release]
181
- if: ${{ inputs.publish != 'false' }}
182
- permissions:
183
- contents: read
184
- id-token: write
185
- steps:
186
- - uses: actions/checkout@v4
187
- with:
188
- ref: ${{ inputs.ref || github.ref }}
189
- - uses: oven-sh/setup-bun@v2
190
- with:
191
- bun-version: 1.3.13
192
- - run: bun install
193
- - name: Publish to npm
194
- run: |
195
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
196
- npm publish --provenance --access public
197
- env:
198
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,29 +0,0 @@
1
- name: Test
2
-
3
- on:
4
- pull_request: {}
5
- push:
6
- branches: [main]
7
-
8
- concurrency:
9
- group: ${{ github.workflow }}-${{ github.ref }}
10
- cancel-in-progress: true
11
-
12
- jobs:
13
- test:
14
- runs-on: ubuntu-latest
15
- steps:
16
- - uses: actions/checkout@v4
17
- - uses: oven-sh/setup-bun@v2
18
- with:
19
- bun-version: 1.3.13
20
- - run: bun install --frozen-lockfile
21
- - run: bun test
22
- - run: bun run typecheck
23
- - name: Enforce path-utils mediation
24
- run: |
25
- ! grep -rn --include='*.ts' "from \"node:\\(fs\\|path\\|os\\)\"" src/ \
26
- | grep -v "src/infrastructure/path-utils.ts" \
27
- | grep -v "src/infrastructure/io.ts" \
28
- | grep -v "src/services/install-browser-service.ts" \
29
- | grep -q .
@@ -1,152 +0,0 @@
1
- ---
2
- description: Implement tasks from an OpenSpec change (Experimental)
3
- ---
4
-
5
- Implement tasks from an OpenSpec change.
6
-
7
- **Input**: Optionally specify a change name (e.g., `/opsx-apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
8
-
9
- **Steps**
10
-
11
- 1. **Select the change**
12
-
13
- If a name is provided, use it. Otherwise:
14
- - Infer from conversation context if the user mentioned a change
15
- - Auto-select if only one active change exists
16
- - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
17
-
18
- Always announce: "Using change: <name>" and how to override (e.g., `/opsx-apply <other>`).
19
-
20
- 2. **Check status to understand the schema**
21
- ```bash
22
- openspec status --change "<name>" --json
23
- ```
24
- Parse the JSON to understand:
25
- - `schemaName`: The workflow being used (e.g., "spec-driven")
26
- - `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints
27
- - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
28
-
29
- 3. **Get apply instructions**
30
-
31
- ```bash
32
- openspec instructions apply --change "<name>" --json
33
- ```
34
-
35
- This returns:
36
- - `contextFiles`: artifact ID -> array of concrete file paths (varies by schema)
37
- - Progress (total, complete, remaining)
38
- - Task list with status
39
- - Dynamic instruction based on current state
40
-
41
- **Handle states:**
42
- - If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx-continue`
43
- - If `state: "all_done"`: congratulate, suggest archive
44
- - Otherwise: proceed to implementation
45
-
46
- **Workspace guard:** If status JSON reports `actionContext.mode: "workspace-planning"` and `allowedEditRoots` is empty, explain that full workspace apply is not supported in this slice. Treat linked repos and folders as read-only context, ask the user to select an affected area through an explicit implementation workflow, and STOP before editing files.
47
-
48
- 4. **Read context files**
49
-
50
- Read every file path listed under `contextFiles` from the apply instructions output.
51
- The files depend on the schema being used:
52
- - **spec-driven**: proposal, specs, design, tasks
53
- - Other schemas: follow the contextFiles from CLI output
54
-
55
- 5. **Show current progress**
56
-
57
- Display:
58
- - Schema being used
59
- - Progress: "N/M tasks complete"
60
- - Remaining tasks overview
61
- - Dynamic instruction from CLI
62
-
63
- 6. **Implement tasks (loop until done or blocked)**
64
-
65
- For each pending task:
66
- - Show which task is being worked on
67
- - Make the code changes required
68
- - Keep changes minimal and focused
69
- - Mark task complete in the tasks file: `- [ ]` → `- [x]`
70
- - Continue to next task
71
-
72
- **Pause if:**
73
- - Task is unclear → ask for clarification
74
- - Implementation reveals a design issue → suggest updating artifacts
75
- - Error or blocker encountered → report and wait for guidance
76
- - User interrupts
77
-
78
- 7. **On completion or pause, show status**
79
-
80
- Display:
81
- - Tasks completed this session
82
- - Overall progress: "N/M tasks complete"
83
- - If all done: suggest archive
84
- - If paused: explain why and wait for guidance
85
-
86
- **Output During Implementation**
87
-
88
- ```
89
- ## Implementing: <change-name> (schema: <schema-name>)
90
-
91
- Working on task 3/7: <task description>
92
- [...implementation happening...]
93
- ✓ Task complete
94
-
95
- Working on task 4/7: <task description>
96
- [...implementation happening...]
97
- ✓ Task complete
98
- ```
99
-
100
- **Output On Completion**
101
-
102
- ```
103
- ## Implementation Complete
104
-
105
- **Change:** <change-name>
106
- **Schema:** <schema-name>
107
- **Progress:** 7/7 tasks complete ✓
108
-
109
- ### Completed This Session
110
- - [x] Task 1
111
- - [x] Task 2
112
- ...
113
-
114
- All tasks complete! You can archive this change with `/opsx-archive`.
115
- ```
116
-
117
- **Output On Pause (Issue Encountered)**
118
-
119
- ```
120
- ## Implementation Paused
121
-
122
- **Change:** <change-name>
123
- **Schema:** <schema-name>
124
- **Progress:** 4/7 tasks complete
125
-
126
- ### Issue Encountered
127
- <description of the issue>
128
-
129
- **Options:**
130
- 1. <option 1>
131
- 2. <option 2>
132
- 3. Other approach
133
-
134
- What would you like to do?
135
- ```
136
-
137
- **Guardrails**
138
- - Keep going through tasks until done or blocked
139
- - Always read context files before starting (from the apply instructions output)
140
- - If task is ambiguous, pause and ask before implementing
141
- - If implementation reveals issues, pause and suggest artifact updates
142
- - Keep code changes minimal and scoped to each task
143
- - Update task checkbox immediately after completing each task
144
- - Pause on errors, blockers, or unclear requirements - don't guess
145
- - Use contextFiles from CLI output, don't assume specific file names
146
-
147
- **Fluid Workflow Integration**
148
-
149
- This skill supports the "actions on a change" model:
150
-
151
- - **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
152
- - **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
@@ -1,157 +0,0 @@
1
- ---
2
- description: Archive a completed change in the experimental workflow
3
- ---
4
-
5
- Archive a completed change in the experimental workflow.
6
-
7
- **Input**: Optionally specify a change name after `/opsx-archive` (e.g., `/opsx-archive add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
8
-
9
- **Steps**
10
-
11
- 1. **If no change name provided, prompt for selection**
12
-
13
- Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
14
-
15
- Show only active changes (not already archived).
16
- Include the schema used for each change if available.
17
-
18
- **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
19
-
20
- 2. **Check artifact completion status**
21
-
22
- Run `openspec status --change "<name>" --json` to check artifact completion.
23
-
24
- Parse the JSON to understand:
25
- - `schemaName`: The workflow being used
26
- - `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context
27
- - `artifacts`: List of artifacts with their status (`done` or other)
28
-
29
- If status reports `actionContext.mode: "workspace-planning"`, explain that workspace archive is not supported in this slice and STOP. Do not move workspace changes into repo-local archives or edit linked repos.
30
-
31
- **If any artifacts are not `done`:**
32
- - Display warning listing incomplete artifacts
33
- - Prompt user for confirmation to continue
34
- - Proceed if user confirms
35
-
36
- 3. **Check task completion status**
37
-
38
- Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
39
-
40
- Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
41
-
42
- **If incomplete tasks found:**
43
- - Display warning showing count of incomplete tasks
44
- - Prompt user for confirmation to continue
45
- - Proceed if user confirms
46
-
47
- **If no tasks file exists:** Proceed without task-related warning.
48
-
49
- 4. **Assess delta spec sync state**
50
-
51
- Use `artifactPaths.specs.existingOutputPaths` from status JSON to check for delta specs. If none exist, proceed without sync prompt.
52
-
53
- **If delta specs exist:**
54
- - Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
55
- - Determine what changes would be applied (adds, modifications, removals, renames)
56
- - Show a combined summary before prompting
57
-
58
- **Prompt options:**
59
- - If changes needed: "Sync now (recommended)", "Archive without syncing"
60
- - If already synced: "Archive now", "Sync anyway", "Cancel"
61
-
62
- If user chooses sync, use Task tool (subagent_type: "general-purpose", prompt: "Use Skill tool to invoke openspec-sync-specs for change '<name>'. Delta spec analysis: <include the analyzed delta spec summary>"). Proceed to archive regardless of choice.
63
-
64
- 5. **Perform the archive**
65
-
66
- Create an `archive` directory under `planningHome.changesDir` if it doesn't exist:
67
- ```bash
68
- mkdir -p "<planningHome.changesDir>/archive"
69
- ```
70
-
71
- Generate target name using current date: `YYYY-MM-DD-<change-name>`
72
-
73
- **Check if target already exists:**
74
- - If yes: Fail with error, suggest renaming existing archive or using different date
75
- - If no: Move `changeRoot` to the archive directory
76
-
77
- ```bash
78
- mv "<changeRoot>" "<planningHome.changesDir>/archive/YYYY-MM-DD-<name>"
79
- ```
80
-
81
- 6. **Display summary**
82
-
83
- Show archive completion summary including:
84
- - Change name
85
- - Schema that was used
86
- - Archive location
87
- - Spec sync status (synced / sync skipped / no delta specs)
88
- - Note about any warnings (incomplete artifacts/tasks)
89
-
90
- **Output On Success**
91
-
92
- ```
93
- ## Archive Complete
94
-
95
- **Change:** <change-name>
96
- **Schema:** <schema-name>
97
- **Archived to:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/
98
- **Specs:** ✓ Synced to main specs
99
-
100
- All artifacts complete. All tasks complete.
101
- ```
102
-
103
- **Output On Success (No Delta Specs)**
104
-
105
- ```
106
- ## Archive Complete
107
-
108
- **Change:** <change-name>
109
- **Schema:** <schema-name>
110
- **Archived to:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/
111
- **Specs:** No delta specs
112
-
113
- All artifacts complete. All tasks complete.
114
- ```
115
-
116
- **Output On Success With Warnings**
117
-
118
- ```
119
- ## Archive Complete (with warnings)
120
-
121
- **Change:** <change-name>
122
- **Schema:** <schema-name>
123
- **Archived to:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/
124
- **Specs:** Sync skipped (user chose to skip)
125
-
126
- **Warnings:**
127
- - Archived with 2 incomplete artifacts
128
- - Archived with 3 incomplete tasks
129
- - Delta spec sync was skipped (user chose to skip)
130
-
131
- Review the archive if this was not intentional.
132
- ```
133
-
134
- **Output On Error (Archive Exists)**
135
-
136
- ```
137
- ## Archive Failed
138
-
139
- **Change:** <change-name>
140
- **Target:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/
141
-
142
- Target archive directory already exists.
143
-
144
- **Options:**
145
- 1. Rename the existing archive
146
- 2. Delete the existing archive if it's a duplicate
147
- 3. Wait until a different date to archive
148
- ```
149
-
150
- **Guardrails**
151
- - Always prompt for change selection if not provided
152
- - Use artifact graph (openspec status --json) for completion checking
153
- - Don't block archive on warnings - just inform and confirm
154
- - Preserve .openspec.yaml when moving to archive (it moves with the directory)
155
- - Show clear summary of what happened
156
- - If sync is requested, use the Skill tool to invoke `openspec-sync-specs` (agent-driven)
157
- - If delta specs exist, always run the sync assessment and show the combined summary before prompting