Skip to content

Commit 73d67fa

Browse files
committed
chore: address coderabbitai feedback
1 parent 00bd018 commit 73d67fa

20 files changed

Lines changed: 290 additions & 52 deletions

File tree

.claude/commands/opsx/apply.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Implement tasks from an OpenSpec change.
8888

8989
**Output During Implementation**
9090

91-
```
91+
```text
9292
## Implementing: <change-name> (schema: <schema-name>)
9393
9494
Working on task 3/7: <task description>
@@ -102,7 +102,7 @@ Working on task 4/7: <task description>
102102

103103
**Output On Completion**
104104

105-
```
105+
```text
106106
## Implementation Complete
107107
108108
**Change:** <change-name>
@@ -119,7 +119,7 @@ All tasks complete! You can archive this change with `/opsx:archive`.
119119

120120
**Output On Pause (Issue Encountered)**
121121

122-
```
122+
```text
123123
## Implementation Paused
124124
125125
**Change:** <change-name>

.claude/commands/opsx/archive.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,18 @@ Archive a completed change in the experimental workflow.
1111

1212
**Steps**
1313

14-
1. **If no change name provided, prompt for selection**
14+
1. **Resolve change name**
1515

16-
Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
16+
If a change name was provided, use it.
1717

18-
Show only active changes (not already archived).
19-
Include the schema used for each change if available.
18+
If no change name was provided:
19+
- First, try to infer the change name from the conversation context.
20+
- If exactly one active change can be confidently inferred, auto-select it.
21+
- If inference is vague, ambiguous, or no active change can be inferred, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select.
2022

21-
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
23+
When prompting, show only active changes (not already archived) and include the schema used for each change if available.
24+
25+
**IMPORTANT**: Do NOT guess or auto-select a change when inference is vague or ambiguous. Always let the user choose in that case.
2226

2327
2. **Check artifact completion status**
2428

@@ -38,7 +42,7 @@ Archive a completed change in the experimental workflow.
3842

3943
3. **Check task completion status**
4044

41-
Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
45+
Derive the actual task artifact path from the OpenSpec metadata (for example, from `openspec status --change "<name>" --json` or `openspec instructions archive --change "<name>" --json` output, or from `contextFiles`) before reading the file and counting checkboxes.
4246

4347
Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
4448

@@ -151,7 +155,7 @@ Target archive directory already exists.
151155
```
152156

153157
**Guardrails**
154-
- Always prompt for change selection if not provided
158+
- Prompt for change selection only when the change name is not provided and cannot be inferred, or when inference is ambiguous
155159
- Use artifact graph (openspec status --json) for completion checking
156160
- Don't block archive on warnings - just inform and confirm
157161
- Preserve .openspec.yaml when moving to archive (it moves with the directory)

.claude/commands/opsx/sync.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Unlike programmatic merging, you can apply **partial updates**:
119119

120120
**Output On Success**
121121

122-
```
122+
```text
123123
## Specs Synced: <change-name>
124124
125125
Updated main specs:

.claude/skills/openspec-apply-change/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Implement tasks from an OpenSpec change.
9292

9393
**Output During Implementation**
9494

95-
```
95+
```text
9696
## Implementing: <change-name> (schema: <schema-name>)
9797
9898
Working on task 3/7: <task description>
@@ -106,7 +106,7 @@ Working on task 4/7: <task description>
106106

107107
**Output On Completion**
108108

109-
```
109+
```text
110110
## Implementation Complete
111111
112112
**Change:** <change-name>
@@ -123,7 +123,7 @@ All tasks complete! Ready to archive this change.
123123

124124
**Output On Pause (Issue Encountered)**
125125

126-
```
126+
```text
127127
## Implementation Paused
128128
129129
**Change:** <change-name>

.claude/skills/openspec-archive-change/SKILL.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@ Archive a completed change in the experimental workflow.
1515

1616
**Steps**
1717

18-
1. **If no change name provided, prompt for selection**
18+
1. **Resolve change name**
1919

20-
Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
20+
If a change name was provided, use it.
2121

22-
Show only active changes (not already archived).
23-
Include the schema used for each change if available.
22+
If no change name was provided:
23+
- First, try to infer the change name from the conversation context.
24+
- If exactly one active change can be confidently inferred, auto-select it.
25+
- If inference is vague, ambiguous, or no active change can be inferred, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select.
2426

25-
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
27+
When prompting, show only active changes (not already archived) and include the schema used for each change if available.
28+
29+
**IMPORTANT**: Do NOT guess or auto-select a change when inference is vague or ambiguous. Always let the user choose in that case.
2630

2731
2. **Check artifact completion status**
2832

@@ -42,7 +46,7 @@ Archive a completed change in the experimental workflow.
4246

4347
3. **Check task completion status**
4448

45-
Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
49+
Derive the actual task artifact path from the OpenSpec metadata (for example, from `openspec status --change "<name>" --json` or `openspec instructions archive --change "<name>" --json` output, or from `contextFiles`) before reading the file and counting checkboxes.
4650

4751
Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
4852

@@ -108,7 +112,7 @@ All artifacts complete. All tasks complete.
108112
```
109113

110114
**Guardrails**
111-
- Always prompt for change selection if not provided
115+
- Prompt for change selection only when the change name is not provided and cannot be inferred, or when inference is ambiguous
112116
- Use artifact graph (openspec status --json) for completion checking
113117
- Don't block archive on warnings - just inform and confirm
114118
- Preserve .openspec.yaml when moving to archive (it moves with the directory)

.claude/skills/openspec-sync-specs/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Unlike programmatic merging, you can apply **partial updates**:
123123

124124
**Output On Success**
125125

126-
```
126+
```text
127127
## Specs Synced: <change-name>
128128
129129
Updated main specs:

.opencode/commands/opsx-apply.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Implement tasks from an OpenSpec change.
8585

8686
**Output During Implementation**
8787

88-
```
88+
```text
8989
## Implementing: <change-name> (schema: <schema-name>)
9090
9191
Working on task 3/7: <task description>
@@ -99,7 +99,7 @@ Working on task 4/7: <task description>
9999

100100
**Output On Completion**
101101

102-
```
102+
```text
103103
## Implementation Complete
104104
105105
**Change:** <change-name>
@@ -116,7 +116,7 @@ All tasks complete! You can archive this change with `/opsx-archive`.
116116

117117
**Output On Pause (Issue Encountered)**
118118

119-
```
119+
```text
120120
## Implementation Paused
121121
122122
**Change:** <change-name>

.opencode/commands/opsx-archive.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,18 @@ Archive a completed change in the experimental workflow.
88

99
**Steps**
1010

11-
1. **If no change name provided, prompt for selection**
11+
1. **Resolve change name**
1212

13-
Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
13+
If a change name was provided, use it.
1414

15-
Show only active changes (not already archived).
16-
Include the schema used for each change if available.
15+
If no change name was provided:
16+
- First, try to infer the change name from the conversation context.
17+
- If exactly one active change can be confidently inferred, auto-select it.
18+
- If inference is vague, ambiguous, or no active change can be inferred, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select.
1719

18-
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
20+
When prompting, show only active changes (not already archived) and include the schema used for each change if available.
21+
22+
**IMPORTANT**: Do NOT guess or auto-select a change when inference is vague or ambiguous. Always let the user choose in that case.
1923

2024
2. **Check artifact completion status**
2125

@@ -35,7 +39,7 @@ Archive a completed change in the experimental workflow.
3539

3640
3. **Check task completion status**
3741

38-
Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
42+
Derive the actual task artifact path from the OpenSpec metadata (for example, from `openspec status --change "<name>" --json` or `openspec instructions archive --change "<name>" --json` output, or from `contextFiles`) before reading the file and counting checkboxes.
3943

4044
Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
4145

@@ -148,7 +152,7 @@ Target archive directory already exists.
148152
```
149153

150154
**Guardrails**
151-
- Always prompt for change selection if not provided
155+
- Prompt for change selection only when the change name is not provided and cannot be inferred, or when inference is ambiguous
152156
- Use artifact graph (openspec status --json) for completion checking
153157
- Don't block archive on warnings - just inform and confirm
154158
- Preserve .openspec.yaml when moving to archive (it moves with the directory)

.opencode/commands/opsx-sync.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Unlike programmatic merging, you can apply **partial updates**:
116116

117117
**Output On Success**
118118

119-
```
119+
```text
120120
## Specs Synced: <change-name>
121121
122122
Updated main specs:

.opencode/skills/openspec-apply-change/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Implement tasks from an OpenSpec change.
9292

9393
**Output During Implementation**
9494

95-
```
95+
```text
9696
## Implementing: <change-name> (schema: <schema-name>)
9797
9898
Working on task 3/7: <task description>
@@ -106,7 +106,7 @@ Working on task 4/7: <task description>
106106

107107
**Output On Completion**
108108

109-
```
109+
```text
110110
## Implementation Complete
111111
112112
**Change:** <change-name>
@@ -123,7 +123,7 @@ All tasks complete! Ready to archive this change.
123123

124124
**Output On Pause (Issue Encountered)**
125125

126-
```
126+
```text
127127
## Implementation Paused
128128
129129
**Change:** <change-name>

0 commit comments

Comments
 (0)