6a-spec-install 1.0.8-dev.3 → 1.0.8

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.
@@ -19,6 +19,7 @@
19
19
  ## 前置条件
20
20
  - 已通过 `/6aspec:green:new` 创建了需求目录和初始 `requirement.md`
21
21
  - 状态文件 `.green-status.json` 存在
22
+ - **阶段限制**:需求澄清(clarify)仅允许在 **new 之后、领域建模(model)之前** 执行。进入领域建模及后续阶段后,不得再执行需求澄清。
22
23
 
23
24
  ## 输入要求
24
25
  - **自动读取**:现有的 `requirement.md` 和 `.green-status.json`
@@ -43,15 +44,22 @@ find 6aspecdoc/green -maxdepth 2 -name ".green-status.json" -type f
43
44
  - 读取 `6aspecdoc/green/<feature-name>/.green-status.json`
44
45
  - 读取 `6aspecdoc/green/<feature-name>/requirement.md`
45
46
 
46
- **1.3 状态检查**
47
+ **1.3 阶段门禁(必须通过,否则拒绝执行)**
47
48
 
48
- 允许的状态:`created` `requirement_clarified`
49
+ 需求澄清仅允许在 **new 之后、model 之前** 执行。读取状态文件后,检查 `status`:
50
+
51
+ - **允许执行**:仅当 `status` 为 **`created`** 或 **`requirement_clarified`** 时,允许继续执行本 SOP。
52
+ - **拒绝执行**:若 `status` 为 **`modeled`**、**`designed`**、**`tasks_created`**、**`implementing`**、**`completed`**、**`archived`** 中任一,则**立即停止**,不得进行任何需求文档修改或澄清对话,并输出:
49
53
 
50
- 如果状态不符合,输出:
51
54
  ```
52
- ⚠️ 当前状态为 <status>,通常在 "created" 或 "requirement_clarified" 阶段执行 clarify
55
+ 不允许执行需求澄清 (clarify)
56
+
57
+ 当前状态:<status>
58
+ 允许执行 clarify 的阶段:仅限 created 或 requirement_clarified(即 new 之后、领域建模 model 之前)。
59
+
60
+ 主流程中需求澄清窗口已结束,进入领域建模及后续阶段后不得再修改需求澄清范围。若确有需求变更,请与产品/业务方评估后,通过新需求或变更流程处理。
53
61
 
54
- 是否继续?(在后续阶段执行 clarify 会更新需求文档但不会回退状态)
62
+ 下一步建议:运行 /6aspec:green:status 查看当前状态,或按当前阶段继续执行对应命令(如 model、design、tasks、execute-task、archive)。
55
63
  ```
56
64
 
57
65
  ### Step 2: 分析现有文档的薄弱环节
@@ -184,6 +192,7 @@ find 6aspecdoc/green -maxdepth 2 -name ".green-status.json" -type f
184
192
  4. 更新后检查文档格式是否符合 `new` SOP 中的模板规范
185
193
 
186
194
  ## 注意
195
+ - **阶段限制**:仅当状态为 `created` 或 `requirement_clarified` 时可执行;进入 `modeled` 及之后阶段后**禁止**执行 clarify,直接拒绝并提示。
187
196
  - **不可覆盖**:绝不可覆盖用户之前已确认的结论,只能追加新信息
188
197
  - **递进深入**:每一轮 clarify 的问题应该比上一轮更深入、更具体
189
198
  - **适时收敛**:如果评估所有维度都是 🟢,应主动建议用户进入下一步(领域建模),而不是无限制地继续澄清
@@ -0,0 +1,198 @@
1
+ # rollback: 流程回退标准操作流程 (Rollback SOP)
2
+
3
+ ## 目标
4
+ 将当前需求回退**一个阶段**,并删除该阶段生成的工件,以便重新执行上一阶段或修正后重做本阶段。仅允许单步回退,且**必须获得用户明确确认后**才执行删除与状态更新。
5
+
6
+ ## 规则
7
+ 1. **单步回退**:每次只能回退一个阶段,不允许跨多阶段回退
8
+ 2. **先提示后执行**:必须先列出将删除的文件并提示用户,**只有在用户给出明确确认指令后**才允许执行删除和状态更新
9
+ 3. **禁止从实现阶段回退**:状态为 `implementing`、`completed`、`archived` 时不允许回退;`created` 无上一阶段,也不允许
10
+
11
+ ## 允许回退的状态与目标
12
+
13
+ | 当前状态 | 回退后状态 | 将删除的工件 |
14
+ |----------|------------|--------------|
15
+ | `requirement_clarified` | `created` | `6aspecdoc/green/<feature-name>/requirement.md` |
16
+ | `modeled` | `requirement_clarified` | `6aspecdoc/green/<feature-name>/artifacts/domain-model.md` |
17
+ | `designed` | `modeled` | `6aspecdoc/green/<feature-name>/artifacts/tech-design.md`、`api-definition.md`;若存在则一并删除 `artifacts/visual-logic.md` |
18
+ | `tasks_created` | `designed` | `6aspecdoc/green/<feature-name>/tasks/` 目录下全部文件(含 `README.md` 及所有 `task-*.md`) |
19
+
20
+ ## 执行步骤
21
+
22
+ ### Step 1: 确定需求并读取状态
23
+
24
+ 1. **确定当前需求**:根据当前工作目录或用户 @ 的文件,确定 `6aspecdoc/green/<feature-name>/`;若有多个需求则让用户选择。
25
+ 2. **读取状态文件**:读取 `6aspecdoc/green/<feature-name>/.green-status.json`。若文件不存在,停止并提示先运行 `/6aspec:green:new`。
26
+ 3. **阶段门禁**:检查 `status`:
27
+ - **允许回退**:仅当 `status` 为 `requirement_clarified`、`modeled`、`designed`、`tasks_created` 之一时继续。
28
+ - **拒绝回退**:若为 `created`、`implementing`、`completed`、`archived`,则停止并输出:
29
+
30
+ ```
31
+ ❌ 不允许执行回退 (rollback)
32
+
33
+ 当前状态:<status>
34
+
35
+ 允许回退的阶段:仅限 requirement_clarified、modeled、designed、tasks_created。
36
+ created(无上一阶段)、implementing(已进入代码实现)、completed、archived 不允许回退。
37
+
38
+ 若已进入实现阶段且需求有变更,建议通过修改需求/设计文档并补充任务处理,或新建需求。
39
+ ```
40
+
41
+ ### Step 2: 列出回退影响并请求用户明确确认
42
+
43
+ 根据当前状态,输出**回退影响说明**,并**禁止在未得到用户明确确认前执行任何删除或写状态文件操作**。
44
+
45
+ 输出格式(必须包含以下内容):
46
+
47
+ ```markdown
48
+ ## 回退影响说明
49
+
50
+ - **当前状态**:<current-status>
51
+ - **回退后状态**:<target-status>
52
+ - **回退后下一步**:需重新执行 <command>(<描述>)
53
+
54
+ ### 即将删除的文件(执行回退后将不可恢复)
55
+
56
+ <按下面表格根据当前状态填写>
57
+
58
+ | 路径 | 说明 |
59
+ |------|------|
60
+ | <path1> | <说明> |
61
+ | <path2> | <说明> |
62
+
63
+ ### 状态文件更新
64
+
65
+ - `.green-status.json` 中 `status` 将更新为 `<target-status>`
66
+ - 当前阶段对应工件的 `status` 将置为 pending/blocked
67
+
68
+ ---
69
+
70
+ ⚠️ **请确认后再执行回退**
71
+
72
+ 回退将**永久删除**上述文件,且不可通过本命令恢复。
73
+
74
+ 请明确回复以下之一后,我才会执行删除与状态更新:
75
+ - **「确认回退」**
76
+ - **「执行回退」**
77
+
78
+ 若不需要回退,请直接说明取消。
79
+ ```
80
+
81
+ **根据当前状态填写的删除清单:**
82
+
83
+ - **requirement_clarified → created**
84
+ | 路径 | 说明 |
85
+ |------|------|
86
+ | `6aspecdoc/green/<feature-name>/requirement.md` | 需求澄清文档 |
87
+
88
+ - **modeled → requirement_clarified**
89
+ | 路径 | 说明 |
90
+ |------|------|
91
+ | `6aspecdoc/green/<feature-name>/artifacts/domain-model.md` | 领域模型文档 |
92
+
93
+ - **designed → modeled**
94
+ | 路径 | 说明 |
95
+ |------|------|
96
+ | `6aspecdoc/green/<feature-name>/artifacts/tech-design.md` | 技术设计文档 |
97
+ | `6aspecdoc/green/<feature-name>/artifacts/api-definition.md` | API 定义文档 |
98
+ | `6aspecdoc/green/<feature-name>/artifacts/visual-logic.md` | 可视化逻辑图(若存在) |
99
+
100
+ - **tasks_created → designed**
101
+ | 路径 | 说明 |
102
+ |------|------|
103
+ | `6aspecdoc/green/<feature-name>/tasks/` 下全部文件 | 任务列表及 README 等 |
104
+
105
+ ### Step 3: 等待用户明确确认
106
+
107
+ - **仅当**用户回复中包含「确认回退」或「执行回退」的**明确意图**时,才继续执行 Step 4。
108
+ - 若用户回复取消、或仅表达犹豫(如「再想想」),则**不执行**回退,并回复已取消。
109
+ - 若用户未明确确认,则**不得**执行任何文件删除或状态文件写入。
110
+
111
+ ### Step 4: 执行回退(仅在用户已明确确认后)
112
+
113
+ 4.1 **删除工件文件**
114
+ 按 Step 2 中列出的路径执行删除(若某路径不存在则跳过,不报错)。
115
+
116
+ 4.2 **更新 `.green-status.json`**
117
+ 按当前回退类型更新状态与工件状态(见下表),并更新 `lastModified`、`nextAction`。
118
+
119
+ **requirement_clarified → created**
120
+
121
+ ```json
122
+ {
123
+ "status": "created",
124
+ "lastModified": "<ISO8601-now>",
125
+ "artifacts": {
126
+ "requirement": { "status": "pending", "path": "..." },
127
+ "models": { "status": "blocked", "path": "..." },
128
+ "design": { "status": "blocked", "path": "..." },
129
+ "tasks": { "status": "blocked", "path": "..." }
130
+ },
131
+ "nextAction": { "command": "new", "description": "完成需求澄清" }
132
+ }
133
+ ```
134
+
135
+ **modeled → requirement_clarified**
136
+
137
+ ```json
138
+ {
139
+ "status": "requirement_clarified",
140
+ "lastModified": "<ISO8601-now>",
141
+ "artifacts": {
142
+ "models": { "status": "ready", "path": "..." },
143
+ "design": { "status": "blocked", "path": "..." },
144
+ "tasks": { "status": "blocked", "path": "..." }
145
+ },
146
+ "nextAction": { "command": "model", "description": "开始领域建模" }
147
+ }
148
+ ```
149
+
150
+ **designed → modeled**
151
+
152
+ ```json
153
+ {
154
+ "status": "modeled",
155
+ "lastModified": "<ISO8601-now>",
156
+ "artifacts": {
157
+ "design": { "status": "blocked", "path": "..." },
158
+ "tasks": { "status": "blocked", "path": "..." }
159
+ },
160
+ "tasks": { "total": 0, "completed": 0, "remaining": 0 },
161
+ "nextAction": { "command": "design", "description": "开始技术方案设计" }
162
+ }
163
+ ```
164
+
165
+ **tasks_created → designed**
166
+
167
+ ```json
168
+ {
169
+ "status": "designed",
170
+ "lastModified": "<ISO8601-now>",
171
+ "artifacts": {
172
+ "tasks": { "status": "blocked", "path": "..." }
173
+ },
174
+ "tasks": { "total": 0, "completed": 0, "remaining": 0 },
175
+ "nextAction": { "command": "tasks", "description": "开始任务拆解" }
176
+ }
177
+ ```
178
+
179
+ ### Step 5: 输出回退结果
180
+
181
+ ```
182
+ ✅ 回退已执行
183
+
184
+ 需求:<feature-name>
185
+ 回退前状态:<previous-status>
186
+ 当前状态:<new-status>
187
+ 已删除:<列出已删除的路径>
188
+
189
+ 下一步:请运行 /6aspec:green:<command> 重新执行该阶段(或先修改需求/设计后再执行)。
190
+ ```
191
+
192
+ ## 注意
193
+ - **严禁在未获得用户明确确认前**执行 Step 4 的删除或状态更新。
194
+ - 删除为永久操作,不提供撤销;用户确认前务必确保其理解将删除的内容。
195
+ - 仅支持单步回退;需回退多步时,请多次执行 rollback。
196
+
197
+ ## 参考
198
+ - 状态定义:`.6aspec/rules/green/green_status_schema.md`
@@ -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
  ### 初始状态(刚创建)
@@ -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.3",
3
+ "version": "1.0.8",
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