optimade 2.1.0 → 2.1.1

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.
@@ -0,0 +1,159 @@
1
+ ---
2
+ name: openspec-apply-change
3
+ description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
4
+ license: MIT
5
+ compatibility: Requires openspec CLI.
6
+ metadata:
7
+ author: openspec
8
+ version: "1.0"
9
+ generatedBy: "1.4.1"
10
+ ---
11
+
12
+ Implement tasks from an OpenSpec change.
13
+
14
+ **Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
15
+
16
+ **Steps**
17
+
18
+ 1. **Select the change**
19
+
20
+ If a name is provided, use it. Otherwise:
21
+ - Infer from conversation context if the user mentioned a change
22
+ - Auto-select if only one active change exists
23
+ - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
24
+
25
+ Always announce: "Using change: <name>" and how to override (e.g., `/opsx-apply <other>`).
26
+
27
+ 2. **Check status to understand the schema**
28
+ ```bash
29
+ openspec status --change "<name>" --json
30
+ ```
31
+ Parse the JSON to understand:
32
+ - `schemaName`: The workflow being used (e.g., "spec-driven")
33
+ - `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints
34
+ - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
35
+
36
+ 3. **Get apply instructions**
37
+
38
+ ```bash
39
+ openspec instructions apply --change "<name>" --json
40
+ ```
41
+
42
+ This returns:
43
+ - `contextFiles`: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
44
+ - Progress (total, complete, remaining)
45
+ - Task list with status
46
+ - Dynamic instruction based on current state
47
+
48
+ **Handle states:**
49
+ - If `state: "blocked"` (missing artifacts): show message, suggest using openspec-continue-change
50
+ - If `state: "all_done"`: congratulate, suggest archive
51
+ - Otherwise: proceed to implementation
52
+
53
+ **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.
54
+
55
+ 4. **Read context files**
56
+
57
+ Read every file path listed under `contextFiles` from the apply instructions output.
58
+ The files depend on the schema being used:
59
+ - **spec-driven**: proposal, specs, design, tasks
60
+ - Other schemas: follow the contextFiles from CLI output
61
+
62
+ 5. **Show current progress**
63
+
64
+ Display:
65
+ - Schema being used
66
+ - Progress: "N/M tasks complete"
67
+ - Remaining tasks overview
68
+ - Dynamic instruction from CLI
69
+
70
+ 6. **Implement tasks (loop until done or blocked)**
71
+
72
+ For each pending task:
73
+ - Show which task is being worked on
74
+ - Make the code changes required
75
+ - Keep changes minimal and focused
76
+ - Mark task complete in the tasks file: `- [ ]` → `- [x]`
77
+ - Continue to next task
78
+
79
+ **Pause if:**
80
+ - Task is unclear → ask for clarification
81
+ - Implementation reveals a design issue → suggest updating artifacts
82
+ - Error or blocker encountered → report and wait for guidance
83
+ - User interrupts
84
+
85
+ 7. **On completion or pause, show status**
86
+
87
+ Display:
88
+ - Tasks completed this session
89
+ - Overall progress: "N/M tasks complete"
90
+ - If all done: suggest archive
91
+ - If paused: explain why and wait for guidance
92
+
93
+ **Output During Implementation**
94
+
95
+ ```
96
+ ## Implementing: <change-name> (schema: <schema-name>)
97
+
98
+ Working on task 3/7: <task description>
99
+ [...implementation happening...]
100
+ ✓ Task complete
101
+
102
+ Working on task 4/7: <task description>
103
+ [...implementation happening...]
104
+ ✓ Task complete
105
+ ```
106
+
107
+ **Output On Completion**
108
+
109
+ ```
110
+ ## Implementation Complete
111
+
112
+ **Change:** <change-name>
113
+ **Schema:** <schema-name>
114
+ **Progress:** 7/7 tasks complete ✓
115
+
116
+ ### Completed This Session
117
+ - [x] Task 1
118
+ - [x] Task 2
119
+ ...
120
+
121
+ All tasks complete! Ready to archive this change.
122
+ ```
123
+
124
+ **Output On Pause (Issue Encountered)**
125
+
126
+ ```
127
+ ## Implementation Paused
128
+
129
+ **Change:** <change-name>
130
+ **Schema:** <schema-name>
131
+ **Progress:** 4/7 tasks complete
132
+
133
+ ### Issue Encountered
134
+ <description of the issue>
135
+
136
+ **Options:**
137
+ 1. <option 1>
138
+ 2. <option 2>
139
+ 3. Other approach
140
+
141
+ What would you like to do?
142
+ ```
143
+
144
+ **Guardrails**
145
+ - Keep going through tasks until done or blocked
146
+ - Always read context files before starting (from the apply instructions output)
147
+ - If task is ambiguous, pause and ask before implementing
148
+ - If implementation reveals issues, pause and suggest artifact updates
149
+ - Keep code changes minimal and scoped to each task
150
+ - Update task checkbox immediately after completing each task
151
+ - Pause on errors, blockers, or unclear requirements - don't guess
152
+ - Use contextFiles from CLI output, don't assume specific file names
153
+
154
+ **Fluid Workflow Integration**
155
+
156
+ This skill supports the "actions on a change" model:
157
+
158
+ - **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
159
+ - **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: openspec-archive-change
3
+ description: Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
4
+ license: MIT
5
+ compatibility: Requires openspec CLI.
6
+ metadata:
7
+ author: openspec
8
+ version: "1.0"
9
+ generatedBy: "1.4.1"
10
+ ---
11
+
12
+ Archive a completed change in the experimental workflow.
13
+
14
+ **Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
15
+
16
+ **Steps**
17
+
18
+ 1. **If no change name provided, prompt for selection**
19
+
20
+ Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
21
+
22
+ Show only active changes (not already archived).
23
+ Include the schema used for each change if available.
24
+
25
+ **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
26
+
27
+ 2. **Check artifact completion status**
28
+
29
+ Run `openspec status --change "<name>" --json` to check artifact completion.
30
+
31
+ Parse the JSON to understand:
32
+ - `schemaName`: The workflow being used
33
+ - `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context
34
+ - `artifacts`: List of artifacts with their status (`done` or other)
35
+
36
+ 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.
37
+
38
+ **If any artifacts are not `done`:**
39
+ - Display warning listing incomplete artifacts
40
+ - Use **AskUserQuestion tool** to confirm user wants to proceed
41
+ - Proceed if user confirms
42
+
43
+ 3. **Check task completion status**
44
+
45
+ Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
46
+
47
+ Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
48
+
49
+ **If incomplete tasks found:**
50
+ - Display warning showing count of incomplete tasks
51
+ - Use **AskUserQuestion tool** to confirm user wants to proceed
52
+ - Proceed if user confirms
53
+
54
+ **If no tasks file exists:** Proceed without task-related warning.
55
+
56
+ 4. **Assess delta spec sync state**
57
+
58
+ Use `artifactPaths.specs.existingOutputPaths` from status JSON to check for delta specs. If none exist, proceed without sync prompt.
59
+
60
+ **If delta specs exist:**
61
+ - Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
62
+ - Determine what changes would be applied (adds, modifications, removals, renames)
63
+ - Show a combined summary before prompting
64
+
65
+ **Prompt options:**
66
+ - If changes needed: "Sync now (recommended)", "Archive without syncing"
67
+ - If already synced: "Archive now", "Sync anyway", "Cancel"
68
+
69
+ 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.
70
+
71
+ 5. **Perform the archive**
72
+
73
+ Create an `archive` directory under `planningHome.changesDir` if it doesn't exist:
74
+ ```bash
75
+ mkdir -p "<planningHome.changesDir>/archive"
76
+ ```
77
+
78
+ Generate target name using current date: `YYYY-MM-DD-<change-name>`
79
+
80
+ **Check if target already exists:**
81
+ - If yes: Fail with error, suggest renaming existing archive or using different date
82
+ - If no: Move `changeRoot` to the archive directory
83
+
84
+ ```bash
85
+ mv "<changeRoot>" "<planningHome.changesDir>/archive/YYYY-MM-DD-<name>"
86
+ ```
87
+
88
+ 6. **Display summary**
89
+
90
+ Show archive completion summary including:
91
+ - Change name
92
+ - Schema that was used
93
+ - Archive location
94
+ - Whether specs were synced (if applicable)
95
+ - Note about any warnings (incomplete artifacts/tasks)
96
+
97
+ **Output On Success**
98
+
99
+ ```
100
+ ## Archive Complete
101
+
102
+ **Change:** <change-name>
103
+ **Schema:** <schema-name>
104
+ **Archived to:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/
105
+ **Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
106
+
107
+ All artifacts complete. All tasks complete.
108
+ ```
109
+
110
+ **Guardrails**
111
+ - Always prompt for change selection if not provided
112
+ - Use artifact graph (openspec status --json) for completion checking
113
+ - Don't block archive on warnings - just inform and confirm
114
+ - Preserve .openspec.yaml when moving to archive (it moves with the directory)
115
+ - Show clear summary of what happened
116
+ - If sync is requested, use openspec-sync-specs approach (agent-driven)
117
+ - If delta specs exist, always run the sync assessment and show the combined summary before prompting
@@ -0,0 +1,287 @@
1
+ ---
2
+ name: openspec-explore
3
+ description: Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
4
+ license: MIT
5
+ compatibility: Requires openspec CLI.
6
+ metadata:
7
+ author: openspec
8
+ version: "1.0"
9
+ generatedBy: "1.4.1"
10
+ ---
11
+
12
+ Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
13
+
14
+ **IMPORTANT: Explore mode is for thinking, not implementing.** You may read files, search code, and investigate the codebase, but you must NEVER write code or implement features. If the user asks you to implement something, remind them to exit explore mode first and create a change proposal. You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
15
+
16
+ **This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
17
+
18
+ ---
19
+
20
+ ## The Stance
21
+
22
+ - **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
23
+ - **Open threads, not interrogations** - Surface multiple interesting directions and let the user follow what resonates. Don't funnel them through a single path of questions.
24
+ - **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
25
+ - **Adaptive** - Follow interesting threads, pivot when new information emerges
26
+ - **Patient** - Don't rush to conclusions, let the shape of the problem emerge
27
+ - **Grounded** - Explore the actual codebase when relevant, don't just theorize
28
+
29
+ ---
30
+
31
+ ## What You Might Do
32
+
33
+ Depending on what the user brings, you might:
34
+
35
+ **Explore the problem space**
36
+ - Ask clarifying questions that emerge from what they said
37
+ - Challenge assumptions
38
+ - Reframe the problem
39
+ - Find analogies
40
+
41
+ **Investigate the codebase**
42
+ - Map existing architecture relevant to the discussion
43
+ - Find integration points
44
+ - Identify patterns already in use
45
+ - Surface hidden complexity
46
+
47
+ **Compare options**
48
+ - Brainstorm multiple approaches
49
+ - Build comparison tables
50
+ - Sketch tradeoffs
51
+ - Recommend a path (if asked)
52
+
53
+ **Visualize**
54
+ ```
55
+ ┌─────────────────────────────────────────┐
56
+ │ Use ASCII diagrams liberally │
57
+ ├─────────────────────────────────────────┤
58
+ │ │
59
+ │ ┌────────┐ ┌────────┐ │
60
+ │ │ State │────────▶│ State │ │
61
+ │ │ A │ │ B │ │
62
+ │ └────────┘ └────────┘ │
63
+ │ │
64
+ │ System diagrams, state machines, │
65
+ │ data flows, architecture sketches, │
66
+ │ dependency graphs, comparison tables │
67
+ │ │
68
+ └─────────────────────────────────────────┘
69
+ ```
70
+
71
+ **Surface risks and unknowns**
72
+ - Identify what could go wrong
73
+ - Find gaps in understanding
74
+ - Suggest spikes or investigations
75
+
76
+ ---
77
+
78
+ ## OpenSpec Awareness
79
+
80
+ You have full context of the OpenSpec system. Use it naturally, don't force it.
81
+
82
+ ### Check for context
83
+
84
+ At the start, quickly check what exists:
85
+ ```bash
86
+ openspec list --json
87
+ ```
88
+
89
+ This tells you:
90
+ - If there are active changes
91
+ - Their names, schemas, and status
92
+ - What the user might be working on
93
+
94
+ ### When no change exists
95
+
96
+ Think freely. When insights crystallize, you might offer:
97
+
98
+ - "This feels solid enough to start a change. Want me to create a proposal?"
99
+ - Or keep exploring - no pressure to formalize
100
+
101
+ ### When a change exists
102
+
103
+ If the user mentions a change or you detect one is relevant:
104
+
105
+ 1. **Resolve and read existing artifacts for context**
106
+ - Run `openspec status --change "<name>" --json`.
107
+ - Use `changeRoot`, `artifactPaths`, and `actionContext` from the status JSON.
108
+ - Read existing files from `artifactPaths.<artifact>.existingOutputPaths`.
109
+
110
+ 2. **Reference them naturally in conversation**
111
+ - "Your design mentions using Redis, but we just realized SQLite fits better..."
112
+ - "The proposal scopes this to premium users, but we're now thinking everyone..."
113
+
114
+ 3. **Offer to capture when decisions are made**
115
+
116
+ | Insight Type | Where to Capture |
117
+ |----------------------------|--------------------------------|
118
+ | New requirement discovered | `specs/<capability>/spec.md` |
119
+ | Requirement changed | `specs/<capability>/spec.md` |
120
+ | Design decision made | `design.md` |
121
+ | Scope changed | `proposal.md` |
122
+ | New work identified | `tasks.md` |
123
+ | Assumption invalidated | Relevant artifact |
124
+
125
+ Example offers:
126
+ - "That's a design decision. Capture it in design.md?"
127
+ - "This is a new requirement. Add it to specs?"
128
+ - "This changes scope. Update the proposal?"
129
+
130
+ 4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
131
+
132
+ ---
133
+
134
+ ## What You Don't Have To Do
135
+
136
+ - Follow a script
137
+ - Ask the same questions every time
138
+ - Produce a specific artifact
139
+ - Reach a conclusion
140
+ - Stay on topic if a tangent is valuable
141
+ - Be brief (this is thinking time)
142
+
143
+ ---
144
+
145
+ ## Handling Different Entry Points
146
+
147
+ **User brings a vague idea:**
148
+ ```
149
+ User: I'm thinking about adding real-time collaboration
150
+
151
+ You: Real-time collab is a big space. Let me think about this...
152
+
153
+ COLLABORATION SPECTRUM
154
+ ════════════════════════════════════════════
155
+
156
+ Awareness Coordination Sync
157
+ │ │ │
158
+ ▼ ▼ ▼
159
+ ┌────────┐ ┌────────┐ ┌────────┐
160
+ │Presence│ │Cursors │ │ CRDT │
161
+ │ "3 │ │ Multi │ │Conflict│
162
+ │online" │ │ select │ │ free │
163
+ └────────┘ └────────┘ └────────┘
164
+ │ │ │
165
+ trivial moderate complex
166
+
167
+ Where's your head at?
168
+ ```
169
+
170
+ **User brings a specific problem:**
171
+ ```
172
+ User: The auth system is a mess
173
+
174
+ You: [reads codebase]
175
+
176
+ ┌─────────────────────────────────────────────┐
177
+ │ CURRENT AUTH FLOW │
178
+ └─────────────────────────────────────────────┘
179
+
180
+ ┌─────────────┼─────────────┐
181
+ ▼ ▼ ▼
182
+ ┌─────────┐ ┌─────────┐ ┌─────────┐
183
+ │ Google │ │ GitHub │ │ Email │
184
+ │ OAuth │ │ OAuth │ │ Magic │
185
+ └────┬────┘ └────┬────┘ └────┬────┘
186
+ │ │ │
187
+ └─────────────┼─────────────┘
188
+
189
+ ┌───────────┐
190
+ │ Session │
191
+ └─────┬─────┘
192
+
193
+
194
+ ┌───────────┐
195
+ │ Perms │
196
+ └───────────┘
197
+
198
+ I see three tangles. Which one's burning?
199
+ ```
200
+
201
+ **User is stuck mid-implementation:**
202
+ ```
203
+ User: /opsx-explore add-auth-system
204
+ The OAuth integration is more complex than expected
205
+
206
+ You: [reads change artifacts]
207
+
208
+ You're on task 4: "Implement OAuth flow"
209
+
210
+ Let me trace what's involved...
211
+
212
+ [draws diagram, explores options, suggests paths]
213
+
214
+ Want to update the design to reflect this?
215
+ Or add a spike task to investigate?
216
+ ```
217
+
218
+ **User wants to compare options:**
219
+ ```
220
+ User: Should we use Postgres or SQLite?
221
+
222
+ You: Generic answer is boring. What's the context?
223
+
224
+ User: A CLI tool that tracks local dev environments
225
+
226
+ You: That changes everything.
227
+
228
+ ┌─────────────────────────────────────────────────┐
229
+ │ CLI TOOL DATA STORAGE │
230
+ └─────────────────────────────────────────────────┘
231
+
232
+ Key constraints:
233
+ • No daemon running
234
+ • Must work offline
235
+ • Single user
236
+
237
+ SQLite Postgres
238
+ Deployment embedded ✓ needs server ✗
239
+ Offline yes ✓ no ✗
240
+ Single file yes ✓ no ✗
241
+
242
+ SQLite. Not even close.
243
+
244
+ Unless... is there a sync component?
245
+ ```
246
+
247
+ ---
248
+
249
+ ## Ending Discovery
250
+
251
+ There's no required ending. Discovery might:
252
+
253
+ - **Flow into a proposal**: "Ready to start? I can create a change proposal."
254
+ - **Result in artifact updates**: "Updated design.md with these decisions"
255
+ - **Just provide clarity**: User has what they need, moves on
256
+ - **Continue later**: "We can pick this up anytime"
257
+
258
+ When it feels like things are crystallizing, you might summarize:
259
+
260
+ ```
261
+ ## What We Figured Out
262
+
263
+ **The problem**: [crystallized understanding]
264
+
265
+ **The approach**: [if one emerged]
266
+
267
+ **Open questions**: [if any remain]
268
+
269
+ **Next steps** (if ready):
270
+ - Create a change proposal
271
+ - Keep exploring: just keep talking
272
+ ```
273
+
274
+ But this summary is optional. Sometimes the thinking IS the value.
275
+
276
+ ---
277
+
278
+ ## Guardrails
279
+
280
+ - **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
281
+ - **Don't fake understanding** - If something is unclear, dig deeper
282
+ - **Don't rush** - Discovery is thinking time, not task time
283
+ - **Don't force structure** - Let patterns emerge naturally
284
+ - **Don't auto-capture** - Offer to save insights, don't just do it
285
+ - **Do visualize** - A good diagram is worth many paragraphs
286
+ - **Do explore the codebase** - Ground discussions in reality
287
+ - **Do question assumptions** - Including the user's and your own
@@ -0,0 +1,111 @@
1
+ ---
2
+ name: openspec-propose
3
+ description: Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
4
+ license: MIT
5
+ compatibility: Requires openspec CLI.
6
+ metadata:
7
+ author: openspec
8
+ version: "1.0"
9
+ generatedBy: "1.4.1"
10
+ ---
11
+
12
+ Propose a new change - create the change and generate all artifacts in one step.
13
+
14
+ I'll create a change with artifacts:
15
+ - proposal.md (what & why)
16
+ - design.md (how)
17
+ - tasks.md (implementation steps)
18
+
19
+ When ready to implement, run /opsx-apply
20
+
21
+ ---
22
+
23
+ **Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
24
+
25
+ **Steps**
26
+
27
+ 1. **If no clear input provided, ask what they want to build**
28
+
29
+ Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
30
+ > "What change do you want to work on? Describe what you want to build or fix."
31
+
32
+ From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
33
+
34
+ **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
35
+
36
+ 2. **Create the change directory**
37
+ ```bash
38
+ openspec new change "<name>"
39
+ ```
40
+ This creates a scaffolded change in the planning home resolved by the CLI with `.openspec.yaml`.
41
+
42
+ 3. **Get the artifact build order**
43
+ ```bash
44
+ openspec status --change "<name>" --json
45
+ ```
46
+ Parse the JSON to get:
47
+ - `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
48
+ - `artifacts`: list of all artifacts with their status and dependencies
49
+ - `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
50
+
51
+ 4. **Create artifacts in sequence until apply-ready**
52
+
53
+ Use the **TodoWrite tool** to track progress through the artifacts.
54
+
55
+ Loop through artifacts in dependency order (artifacts with no pending dependencies first):
56
+
57
+ a. **For each artifact that is `ready` (dependencies satisfied)**:
58
+ - Get instructions:
59
+ ```bash
60
+ openspec instructions <artifact-id> --change "<name>" --json
61
+ ```
62
+ - The instructions JSON includes:
63
+ - `context`: Project background (constraints for you - do NOT include in output)
64
+ - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
65
+ - `template`: The structure to use for your output file
66
+ - `instruction`: Schema-specific guidance for this artifact type
67
+ - `resolvedOutputPath`: Resolved path or pattern to write the artifact
68
+ - `dependencies`: Completed artifacts to read for context
69
+ - Read any completed dependency files for context
70
+ - Create the artifact file using `template` as the structure and write it to `resolvedOutputPath`
71
+ - Apply `context` and `rules` as constraints - but do NOT copy them into the file
72
+ - Show brief progress: "Created <artifact-id>"
73
+
74
+ b. **Continue until all `applyRequires` artifacts are complete**
75
+ - After creating each artifact, re-run `openspec status --change "<name>" --json`
76
+ - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
77
+ - Stop when all `applyRequires` artifacts are done
78
+
79
+ c. **If an artifact requires user input** (unclear context):
80
+ - Use **AskUserQuestion tool** to clarify
81
+ - Then continue with creation
82
+
83
+ 5. **Show final status**
84
+ ```bash
85
+ openspec status --change "<name>"
86
+ ```
87
+
88
+ **Output**
89
+
90
+ After completing all artifacts, summarize:
91
+ - Change name and location
92
+ - List of artifacts created with brief descriptions
93
+ - What's ready: "All artifacts created! Ready for implementation."
94
+ - Prompt: "Run `/opsx-apply` or ask me to implement to start working on the tasks."
95
+
96
+ **Artifact Creation Guidelines**
97
+
98
+ - Follow the `instruction` field from `openspec instructions` for each artifact type
99
+ - The schema defines what each artifact should contain - follow it
100
+ - Read dependency artifacts for context before creating new ones
101
+ - Use `template` as the structure for your output file - fill in its sections
102
+ - **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
103
+ - Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
104
+ - These guide what you write, but should never appear in the output
105
+
106
+ **Guardrails**
107
+ - Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
108
+ - Always read dependency artifacts before creating a new one
109
+ - If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
110
+ - If a change with that name already exists, ask if user wants to continue it or create a new one
111
+ - Verify each artifact file exists after writing before proceeding to next
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Optimade changelog
2
2
 
3
+ ## 2.1.1
4
+
5
+ - Rename `providers.json` to `providers.debug.json` (since not used directly, just for debugging)
6
+
3
7
  ## 2.0.3
4
8
 
5
9
  - Bugfix release
@@ -8,7 +12,7 @@
8
12
 
9
13
  - Add new `npm run prefetch` logic in prefetch.js to check provider avialability,
10
14
  cache provider pagination limits in `provider.attributes.query_limits`,
11
- introduce the sorted and structured providers.json (as source) and prefetched.json (as cache)
15
+ introduce the sorted and structured `providers.json` (as source) and `prefetched.json` (as cache)
12
16
  - Add new arguments `getStructures(providerId, filter, page, limit)` for pagination
13
17
  and pagination limits
14
18
  - Add new logic for catching errors like