6a-spec-install 1.0.8-dev.2 → 1.0.8-dev.4

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 (36) hide show
  1. package/.6aspec/rules/green/6A_archive_sop.md +15 -15
  2. package/.6aspec/rules/green/6A_clarify_sop.md +18 -9
  3. package/.6aspec/rules/green/6A_code_implementation_sop.md +6 -6
  4. package/.6aspec/rules/green/6A_continue_sop.md +5 -5
  5. package/.6aspec/rules/green/6A_design_sop.md +12 -12
  6. package/.6aspec/rules/green/6A_import_model_table_sop.md +2 -2
  7. package/.6aspec/rules/green/6A_model_sop.md +6 -6
  8. package/.6aspec/rules/green/6A_new_sop.md +7 -7
  9. package/.6aspec/rules/green/6A_rollback_sop.md +198 -0
  10. package/.6aspec/rules/green/6A_status_sop.md +7 -7
  11. package/.6aspec/rules/green/6A_tasks_sop.md +8 -8
  12. package/.6aspec/rules/green/6A_visual_logic_sop.md +4 -4
  13. package/.6aspec/rules/green/green_status_schema.md +27 -14
  14. package/.claude/commands/6aspec/green/rollback.md +8 -0
  15. package/.cursor/commands/6aspec/green/rollback.md +9 -0
  16. package/package.json +1 -1
  17. package/.claude/commands/opsx/apply.md +0 -152
  18. package/.claude/commands/opsx/archive.md +0 -157
  19. package/.claude/commands/opsx/bulk-archive.md +0 -242
  20. package/.claude/commands/opsx/continue.md +0 -114
  21. package/.claude/commands/opsx/explore.md +0 -174
  22. package/.claude/commands/opsx/ff.md +0 -94
  23. package/.claude/commands/opsx/new.md +0 -69
  24. package/.claude/commands/opsx/onboard.md +0 -525
  25. package/.claude/commands/opsx/sync.md +0 -134
  26. package/.claude/commands/opsx/verify.md +0 -164
  27. package/.claude/skills/openspec-apply-change/SKILL.md +0 -156
  28. package/.claude/skills/openspec-archive-change/SKILL.md +0 -114
  29. package/.claude/skills/openspec-bulk-archive-change/SKILL.md +0 -246
  30. package/.claude/skills/openspec-continue-change/SKILL.md +0 -118
  31. package/.claude/skills/openspec-explore/SKILL.md +0 -290
  32. package/.claude/skills/openspec-ff-change/SKILL.md +0 -101
  33. package/.claude/skills/openspec-new-change/SKILL.md +0 -74
  34. package/.claude/skills/openspec-onboard/SKILL.md +0 -529
  35. package/.claude/skills/openspec-sync-specs/SKILL.md +0 -138
  36. package/.claude/skills/openspec-verify-change/SKILL.md +0 -168
@@ -15,7 +15,7 @@
15
15
 
16
16
  **1.1 检查是否在需求目录下**
17
17
 
18
- 检查当前工作目录是否在 `6aspec/green/<feature-name>/` 下:
18
+ 检查当前工作目录是否在 `6aspecdoc/green/<feature-name>/` 下:
19
19
 
20
20
  ```bash
21
21
  pwd
@@ -26,7 +26,7 @@ pwd
26
26
  **1.2 如果不在需求目录下,列出所有活跃需求**
27
27
 
28
28
  ```bash
29
- find 6aspec/green -maxdepth 2 -name ".green-status.json" -type f
29
+ find 6aspecdoc/green -maxdepth 2 -name ".green-status.json" -type f
30
30
  ```
31
31
 
32
32
  如果找到多个需求,使用 **AskUserQuestion** 让用户选择要查看的需求。
@@ -40,10 +40,10 @@ find 6aspec/green -maxdepth 2 -name ".green-status.json" -type f
40
40
 
41
41
  ### Step 2: 读取状态文件
42
42
 
43
- 读取 `6aspec/green/<feature-name>/.green-status.json` 文件:
43
+ 读取 `6aspecdoc/green/<feature-name>/.green-status.json` 文件:
44
44
 
45
45
  ```javascript
46
- const statusPath = '6aspec/green/<feature-name>/.green-status.json';
46
+ const statusPath = '6aspecdoc/green/<feature-name>/.green-status.json';
47
47
  const status = JSON.parse(fs.readFileSync(statusPath, 'utf8'));
48
48
  ```
49
49
 
@@ -241,7 +241,7 @@ const status = JSON.parse(fs.readFileSync(statusPath, 'utf8'));
241
241
  ```
242
242
  错误:未找到状态文件
243
243
 
244
- 路径:6aspec/green/<feature-name>/.green-status.json
244
+ 路径:6aspecdoc/green/<feature-name>/.green-status.json
245
245
 
246
246
  这可能是因为:
247
247
  1. 需求目录不是通过 /6aspec:green:new 创建的
@@ -255,7 +255,7 @@ const status = JSON.parse(fs.readFileSync(statusPath, 'utf8'));
255
255
  ```
256
256
  错误:状态文件格式错误
257
257
 
258
- 路径:6aspec/green/<feature-name>/.green-status.json
258
+ 路径:6aspecdoc/green/<feature-name>/.green-status.json
259
259
 
260
260
  错误信息:<parse-error>
261
261
 
@@ -266,7 +266,7 @@ const status = JSON.parse(fs.readFileSync(statusPath, 'utf8'));
266
266
 
267
267
  1. **只读操作**:status 命令只读取状态,不修改任何文件
268
268
  2. **时间格式化**:显示时间时使用易读格式(YYYY-MM-DD HH:mm)
269
- 3. **路径简化**:显示文件路径时使用相对路径,省略 `6aspec/green/<feature-name>/` 前缀
269
+ 3. **路径简化**:显示文件路径时使用相对路径,省略 `6aspecdoc/green/<feature-name>/` 前缀
270
270
  4. **用户友好**:使用图标和颜色(如果终端支持)提升可读性
271
271
  5. **状态一致性**:如果发现状态不一致(如工件状态与生命周期状态不匹配),显示警告信息
272
272
 
@@ -13,8 +13,8 @@ alwaysApply: false
13
13
 
14
14
  在执行任务拆解前,**必须**先完成依赖检查,不通过则**立即停止**并提示,不得继续:
15
15
 
16
- 1. **确定当前需求**:根据当前工作目录或用户 @ 的文件,确定 `6aspec/green/<feature-name>/`;若有多个需求则让用户选择。
17
- 2. **读取状态文件**:读取 `6aspec/green/<feature-name>/.green-status.json`。若文件不存在,停止并提示先运行 `/6aspec:green:new` 创建需求。
16
+ 1. **确定当前需求**:根据当前工作目录或用户 @ 的文件,确定 `6aspecdoc/green/<feature-name>/`;若有多个需求则让用户选择。
17
+ 2. **读取状态文件**:读取 `6aspecdoc/green/<feature-name>/.green-status.json`。若文件不存在,停止并提示先运行 `/6aspec:green:new` 创建需求。
18
18
  3. **检查上一流程已完成**:
19
19
  - 若 `status` 不是 `designed`,停止并提示:
20
20
  ```
@@ -26,7 +26,7 @@ alwaysApply: false
26
26
  请先完成技术方案设计:运行 /6aspec:green:design,并确保生成 artifacts/tech-design.md、api-definition.md 且状态已更新为 designed。
27
27
  ```
28
28
  - 若 `artifacts.design.status` 不是 `done`,停止并提示先运行 `/6aspec:green:design` 完成技术方案。
29
- 4. **检查 tech-design.md 存在**:若 `6aspec/green/<feature-name>/artifacts/tech-design.md` 不存在,停止并提示先完成技术方案设计。
29
+ 4. **检查 tech-design.md 存在**:若 `6aspecdoc/green/<feature-name>/artifacts/tech-design.md` 不存在,停止并提示先完成技术方案设计。
30
30
 
31
31
  **只有以上检查全部通过后,才允许继续执行本 SOP 的拆解步骤。**
32
32
 
@@ -35,7 +35,7 @@ alwaysApply: false
35
35
  你是一个**技术项目经理 (TPM)**。在执行任务拆解前,请严格遵守:
36
36
 
37
37
  1. **主动检索 (Active Retrieval)**:
38
- * 当用户指定 `{功能名称}` 时,优先尝试读取 `6aspec/green/<feature-name>/artifacts/tech-design.md`。
38
+ * 当用户指定 `{功能名称}` 时,优先尝试读取 `6aspecdoc/green/<feature-name>/artifacts/tech-design.md`。
39
39
  * 如果找不到 TDD 文档,**立即停止**并报错,提示用户先完成 TDD 设计。
40
40
 
41
41
  2. **思维链门禁 (Chain of Thought Gatekeeping)**:
@@ -76,7 +76,7 @@ alwaysApply: false
76
76
 
77
77
  ### 1. 目录结构
78
78
  所有任务文件必须存储在以下路径:
79
- - `6aspec/green/<feature-name>/tasks/`(feature-name 使用 kebab-case 命名,如:user-authentication)
79
+ - `6aspecdoc/green/<feature-name>/tasks/`(feature-name 使用 kebab-case 命名,如:user-authentication)
80
80
 
81
81
  ### 2. 文件命名规范
82
82
  - 格式:`task-{序号}-{任务类型}-{功能简名}.md`
@@ -141,16 +141,16 @@ alwaysApply: false
141
141
  2. **合并依赖项**:将该入口点涉及的所有业务逻辑(Service)、数据访问(Repository)、模型定义(DTO/VO/Enum)全部归入该入口点的原子任务中。
142
142
  3. **排序与编排**:基于`<thinking>`中的依赖分析,对任务进行逻辑排序(先基础后上层,先前置后依赖)。
143
143
  4. **生成文件**:为每个识别出的入口点生成独立的任务 Markdown 文件。
144
- 5. **生成总览**:任务拆解完成后,必须在 `6aspec/green/<feature-name>/tasks/README.md` 输出任务总览。
144
+ 5. **生成总览**:任务拆解完成后,必须在 `6aspecdoc/green/<feature-name>/tasks/README.md` 输出任务总览。
145
145
  6. **状态维护(必须执行)**:后续每当完成一个任务,必须同步更新:
146
146
  - 对应任务文件中的"任务状态"。
147
- - `6aspec/green/<feature-name>/tasks/README.md` 中该任务的状态展示。
147
+ - `6aspecdoc/green/<feature-name>/tasks/README.md` 中该任务的状态展示。
148
148
 
149
149
  ## 输出要求
150
150
  1. **格式**:Markdown 源码格式。
151
151
  2. **一致性**:任务中的类名、方法名和字段名必须与 TDD 保持完全一致。
152
152
  3. **禁用范围**:不拆解前端任务、不拆解单纯的单元测试任务、不拆解 Entity/SQL 任务。
153
- 4. **总览 README(必须输出)**:在 `6aspec/green/<feature-name>/tasks/README.md` 生成任务总览文件,必须包含:
153
+ 4. **总览 README(必须输出)**:在 `6aspecdoc/green/<feature-name>/tasks/README.md` 生成任务总览文件,必须包含:
154
154
  - **项目进度看板**:任务总工时、已完成工时、进度条。
155
155
  - **任务清单**:按推荐执行顺序排列,包含状态图标 (✅/🔄/⏳)。
156
156
  - **开发阶段划分**:建议将任务划分为 Phase 1 (Core), Phase 2 (Extensions) 等阶段。
@@ -21,14 +21,14 @@ alwaysApply: false
21
21
 
22
22
  ## 输入要求
23
23
  ### 必需输入
24
- - **TDD 文档路径**:`6aspec/green/<feature-name>/artifacts/tech-design.md`(feature-name 使用 kebab-case 命名,如:user-authentication)
24
+ - **TDD 文档路径**:`6aspecdoc/green/<feature-name>/artifacts/tech-design.md`(feature-name 使用 kebab-case 命名,如:user-authentication)
25
25
  - **人类选择的生成范围(必须明确,否则中断提问)**:
26
26
  - 需要生成的图表类型:Flowchart / Sequence / State(可多选)
27
27
  - 覆盖范围:具体到“哪些入口/哪些业务流程/哪些对象”(例如:仅 `3.1` 中某个写 API;或某个事件订阅;或某个后台任务)
28
28
  - 抽象层级:是否细到 service/repository/facade 级别(建议默认到 service/repository/facade)
29
29
 
30
30
  ### 可选输入(用于补齐 TDD 未显式写清的信息)
31
- - 数据模型文档:`6aspec/green/<feature-name>/artifacts/domain-model.md`
31
+ - 数据模型文档:`6aspecdoc/green/<feature-name>/artifacts/domain-model.md`
32
32
  - PRD:`.prd/{功能名称}-prd.md`
33
33
  - 事件清单:`./.6aspec/biz/event-list.md`(当涉及事件订阅/发布时)
34
34
  - 能力地图:`./.6aspec/biz/functional-capability-Map.md`(当涉及跨模块 Facade 依赖时)
@@ -42,7 +42,7 @@ alwaysApply: false
42
42
 
43
43
  ## 输出要求
44
44
  1. **输出格式**:Markdown 源码 + Mermaid 代码块(严禁截图)
45
- 2. **输出位置**:`6aspec/green/<feature-name>/artifacts/visual-logic.md`
45
+ 2. **输出位置**:`6aspecdoc/green/<feature-name>/artifacts/visual-logic.md`
46
46
  3. **引用关系**:在输出文档开头必须写明:
47
47
  - 输入 TDD 文档路径
48
48
  - 本次选择生成的图表类型与覆盖范围
@@ -88,7 +88,7 @@ alwaysApply: false
88
88
  - 迁移必须标注触发入口(API/事件/定时任务/后台任务)
89
89
 
90
90
  ### 第四步:输出文档并自检
91
- 1. 写入 `6aspec/green/<feature-name>/artifacts/visual-logic.md`
91
+ 1. 写入 `6aspecdoc/green/<feature-name>/artifacts/visual-logic.md`
92
92
  2. 自检:
93
93
  - Mermaid 语法是否完整
94
94
  - 是否严格遵循"按需生成"与"范围约束"
@@ -7,7 +7,7 @@
7
7
  ## 文件位置
8
8
 
9
9
  ```
10
- 6aspec/green/<feature-name>/.green-status.json
10
+ 6aspecdoc/green/<feature-name>/.green-status.json
11
11
  ```
12
12
 
13
13
  ## 状态文件结构
@@ -119,6 +119,19 @@ tasks (任务列表)
119
119
  - 条件:用户确认归档
120
120
  - 触发:执行归档命令
121
121
 
122
+ ## 回退(rollback)
123
+
124
+ 仅允许**单步回退**,且**必须先提示用户、获得明确确认后**才可执行;执行时将删除当前阶段生成的工件。
125
+
126
+ | 当前状态 | 回退后状态 | 触发命令 | 将删除的工件 |
127
+ |----------|------------|----------|--------------|
128
+ | `requirement_clarified` | `created` | `/6aspec:green:rollback` | requirement.md |
129
+ | `modeled` | `requirement_clarified` | `/6aspec:green:rollback` | artifacts/domain-model.md |
130
+ | `designed` | `modeled` | `/6aspec:green:rollback` | artifacts/tech-design.md、api-definition.md、visual-logic.md(若存在) |
131
+ | `tasks_created` | `designed` | `/6aspec:green:rollback` | tasks/ 目录下全部文件 |
132
+
133
+ **不允许回退**:`created`(无上一阶段)、`implementing`、`completed`、`archived`。详见 `.6aspec/rules/green/6A_rollback_sop.md`。
134
+
122
135
  ## 示例
123
136
 
124
137
  ### 初始状态(刚创建)
@@ -132,19 +145,19 @@ tasks (任务列表)
132
145
  "artifacts": {
133
146
  "requirement": {
134
147
  "status": "pending",
135
- "path": "6aspec/green/user-authentication/requirement.md"
148
+ "path": "6aspecdoc/green/user-authentication/requirement.md"
136
149
  },
137
150
  "models": {
138
151
  "status": "blocked",
139
- "path": "6aspec/green/user-authentication/artifacts/"
152
+ "path": "6aspecdoc/green/user-authentication/artifacts/"
140
153
  },
141
154
  "design": {
142
155
  "status": "blocked",
143
- "path": "6aspec/green/user-authentication/artifacts/"
156
+ "path": "6aspecdoc/green/user-authentication/artifacts/"
144
157
  },
145
158
  "tasks": {
146
159
  "status": "blocked",
147
- "path": "6aspec/green/user-authentication/tasks/"
160
+ "path": "6aspecdoc/green/user-authentication/tasks/"
148
161
  }
149
162
  },
150
163
  "tasks": {
@@ -170,20 +183,20 @@ tasks (任务列表)
170
183
  "artifacts": {
171
184
  "requirement": {
172
185
  "status": "done",
173
- "path": "6aspec/green/user-authentication/requirement.md",
186
+ "path": "6aspecdoc/green/user-authentication/requirement.md",
174
187
  "completedAt": "2026-02-16T03:15:00Z"
175
188
  },
176
189
  "models": {
177
190
  "status": "ready",
178
- "path": "6aspec/green/user-authentication/artifacts/"
191
+ "path": "6aspecdoc/green/user-authentication/artifacts/"
179
192
  },
180
193
  "design": {
181
194
  "status": "blocked",
182
- "path": "6aspec/green/user-authentication/artifacts/"
195
+ "path": "6aspecdoc/green/user-authentication/artifacts/"
183
196
  },
184
197
  "tasks": {
185
198
  "status": "blocked",
186
- "path": "6aspec/green/user-authentication/tasks/"
199
+ "path": "6aspecdoc/green/user-authentication/tasks/"
187
200
  }
188
201
  },
189
202
  "tasks": {
@@ -209,23 +222,23 @@ tasks (任务列表)
209
222
  "artifacts": {
210
223
  "requirement": {
211
224
  "status": "done",
212
- "path": "6aspec/green/user-authentication/requirement.md",
225
+ "path": "6aspecdoc/green/user-authentication/requirement.md",
213
226
  "completedAt": "2026-02-16T03:15:00Z"
214
227
  },
215
228
  "models": {
216
229
  "status": "done",
217
- "path": "6aspec/green/user-authentication/artifacts/",
230
+ "path": "6aspecdoc/green/user-authentication/artifacts/",
218
231
  "completedAt": "2026-02-16T03:45:00Z",
219
232
  "files": ["domain-model.md"]
220
233
  },
221
234
  "design": {
222
235
  "status": "done",
223
- "path": "6aspec/green/user-authentication/artifacts/",
236
+ "path": "6aspecdoc/green/user-authentication/artifacts/",
224
237
  "completedAt": "2026-02-16T04:15:00Z"
225
238
  },
226
239
  "tasks": {
227
240
  "status": "done",
228
- "path": "6aspec/green/user-authentication/tasks/",
241
+ "path": "6aspecdoc/green/user-authentication/tasks/",
229
242
  "completedAt": "2026-02-16T04:30:00Z",
230
243
  "files": ["task_01_user_model.md", "task_02_auth_api.md", "task_03_session.md"]
231
244
  }
@@ -250,7 +263,7 @@ tasks (任务列表)
250
263
  所有命令在执行前应该读取状态文件,了解当前状态:
251
264
 
252
265
  ```javascript
253
- const statusPath = '6aspec/green/<feature-name>/.green-status.json';
266
+ const statusPath = '6aspecdoc/green/<feature-name>/.green-status.json';
254
267
  const status = JSON.parse(fs.readFileSync(statusPath, 'utf8'));
255
268
  ```
256
269
 
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: 流程回退(单步回退并删除当前阶段工件,需用户明确确认)
3
+ ---
4
+
5
+ 1. Immediate response upon activation: rollback workflow has been activated
6
+ 2. Read file: `.6aspec/rules/green/6A_rollback_sop.md`
7
+ 3. Strictly follow the "Rollback SOP" defined in that file
8
+ 4. **Do not** perform any file deletion or status file update until the user has explicitly confirmed (e.g. "确认回退" or "执行回退")
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: 流程回退(单步回退并删除当前阶段工件,需用户明确确认)
3
+ alwaysApply: false
4
+ ---
5
+
6
+ 1. Immediate response upon activation: rollback workflow has been activated
7
+ 2. Read file: `.6aspec/rules/green/6A_rollback_sop.md`
8
+ 3. Strictly follow the "Rollback SOP" defined in that file
9
+ 4. **Do not** perform any file deletion or status file update until the user has explicitly confirmed (e.g. "确认回退" or "执行回退")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "6a-spec-install",
3
- "version": "1.0.8-dev.2",
3
+ "version": "1.0.8-dev.4",
4
4
  "description": "6A-spec 驱动开发提示词安装工具,支持 Cursor 和 Claude",
5
5
  "main": "lib/installer.js",
6
6
  "bin": {
@@ -1,152 +0,0 @@
1
- ---
2
- name: "OPSX: Apply"
3
- description: Implement tasks from an OpenSpec change (Experimental)
4
- category: Workflow
5
- tags: [workflow, artifacts, experimental]
6
- ---
7
-
8
- Implement tasks from an OpenSpec change.
9
-
10
- **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.
11
-
12
- **Steps**
13
-
14
- 1. **Select the change**
15
-
16
- If a name is provided, use it. Otherwise:
17
- - Infer from conversation context if the user mentioned a change
18
- - Auto-select if only one active change exists
19
- - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
20
-
21
- Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
22
-
23
- 2. **Check status to understand the schema**
24
- ```bash
25
- openspec status --change "<name>" --json
26
- ```
27
- Parse the JSON to understand:
28
- - `schemaName`: The workflow being used (e.g., "spec-driven")
29
- - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
30
-
31
- 3. **Get apply instructions**
32
-
33
- ```bash
34
- openspec instructions apply --change "<name>" --json
35
- ```
36
-
37
- This returns:
38
- - Context file paths (varies by schema)
39
- - Progress (total, complete, remaining)
40
- - Task list with status
41
- - Dynamic instruction based on current state
42
-
43
- **Handle states:**
44
- - If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx:continue`
45
- - If `state: "all_done"`: congratulate, suggest archive
46
- - Otherwise: proceed to implementation
47
-
48
- 4. **Read context files**
49
-
50
- Read the files listed in `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
- name: "OPSX: Archive"
3
- description: Archive a completed change in the experimental workflow
4
- category: Workflow
5
- tags: [workflow, archive, experimental]
6
- ---
7
-
8
- Archive a completed change in the experimental workflow.
9
-
10
- **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.
11
-
12
- **Steps**
13
-
14
- 1. **If no change name provided, prompt for selection**
15
-
16
- Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
17
-
18
- Show only active changes (not already archived).
19
- Include the schema used for each change if available.
20
-
21
- **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
22
-
23
- 2. **Check artifact completion status**
24
-
25
- Run `openspec status --change "<name>" --json` to check artifact completion.
26
-
27
- Parse the JSON to understand:
28
- - `schemaName`: The workflow being used
29
- - `artifacts`: List of artifacts with their status (`done` or other)
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
- Check for delta specs at `openspec/changes/<name>/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, execute `/opsx:sync` logic. Proceed to archive regardless of choice.
63
-
64
- 5. **Perform the archive**
65
-
66
- Create the archive directory if it doesn't exist:
67
- ```bash
68
- mkdir -p openspec/changes/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 the change directory to archive
76
-
77
- ```bash
78
- mv openspec/changes/<name> openspec/changes/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:** openspec/changes/archive/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:** openspec/changes/archive/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:** openspec/changes/archive/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:** openspec/changes/archive/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 /opsx:sync approach (agent-driven)
157
- - If delta specs exist, always run the sync assessment and show the combined summary before prompting