nano-brain 2026.1.21 → 2026.2.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 (50) hide show
  1. package/.opencode/command/opsx-apply.md +149 -0
  2. package/.opencode/command/opsx-archive.md +154 -0
  3. package/.opencode/command/opsx-explore.md +170 -0
  4. package/.opencode/command/opsx-propose.md +103 -0
  5. package/.opencode/skills/openspec-apply-change/SKILL.md +156 -0
  6. package/.opencode/skills/openspec-archive-change/SKILL.md +114 -0
  7. package/.opencode/skills/openspec-explore/SKILL.md +288 -0
  8. package/.opencode/skills/openspec-propose/SKILL.md +110 -0
  9. package/AGENTS_SNIPPET.md +7 -0
  10. package/CHANGELOG.md +23 -0
  11. package/SKILL.md +29 -9
  12. package/openspec/changes/file-logging/.openspec.yaml +2 -0
  13. package/openspec/changes/file-logging/design.md +62 -0
  14. package/openspec/changes/file-logging/proposal.md +29 -0
  15. package/openspec/changes/file-logging/specs/file-logging/spec.md +97 -0
  16. package/openspec/changes/file-logging/tasks.md +34 -0
  17. package/openspec/changes/vector-store-abstraction/.openspec.yaml +3 -0
  18. package/openspec/changes/vector-store-abstraction/design.md +307 -0
  19. package/openspec/changes/vector-store-abstraction/proposal.md +46 -0
  20. package/openspec/changes/vector-store-abstraction/specs/qdrant-cli/spec.md +48 -0
  21. package/openspec/changes/vector-store-abstraction/specs/vector-migration/spec.md +63 -0
  22. package/openspec/changes/vector-store-abstraction/specs/vector-store-interface/spec.md +48 -0
  23. package/openspec/changes/vector-store-abstraction/tasks.md +109 -0
  24. package/openspec/config.yaml +14 -0
  25. package/package.json +1 -1
  26. package/src/codebase.ts +60 -0
  27. package/src/collections.ts +9 -0
  28. package/src/embeddings.ts +11 -0
  29. package/src/graph.ts +502 -0
  30. package/src/harvester.ts +7 -0
  31. package/src/index.ts +488 -9
  32. package/src/logger.ts +47 -0
  33. package/src/reranker.ts +8 -0
  34. package/src/search.ts +169 -25
  35. package/src/server.ts +365 -12
  36. package/src/storage.ts +10 -1
  37. package/src/store.ts +414 -15
  38. package/src/symbols.ts +556 -0
  39. package/src/types.ts +115 -2
  40. package/src/watcher.ts +10 -0
  41. package/test/graph.test.ts +905 -0
  42. package/test/groups-5-6-7.test.ts +557 -0
  43. package/test/groups-8-9.test.ts +678 -0
  44. package/test/integration.test.ts +9 -9
  45. package/test/search.test.ts +3 -3
  46. package/test/store.test.ts +167 -1
  47. package/test/supersede.test.ts +215 -0
  48. package/test/symbols.test.ts +563 -0
  49. package/test/watcher.test.ts +11 -0
  50. package/test/workspace.test.ts +4 -4
@@ -0,0 +1,149 @@
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
+ - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
27
+
28
+ 3. **Get apply instructions**
29
+
30
+ ```bash
31
+ openspec instructions apply --change "<name>" --json
32
+ ```
33
+
34
+ This returns:
35
+ - Context file paths (varies by schema)
36
+ - Progress (total, complete, remaining)
37
+ - Task list with status
38
+ - Dynamic instruction based on current state
39
+
40
+ **Handle states:**
41
+ - If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx-continue`
42
+ - If `state: "all_done"`: congratulate, suggest archive
43
+ - Otherwise: proceed to implementation
44
+
45
+ 4. **Read context files**
46
+
47
+ Read the files listed in `contextFiles` from the apply instructions output.
48
+ The files depend on the schema being used:
49
+ - **spec-driven**: proposal, specs, design, tasks
50
+ - Other schemas: follow the contextFiles from CLI output
51
+
52
+ 5. **Show current progress**
53
+
54
+ Display:
55
+ - Schema being used
56
+ - Progress: "N/M tasks complete"
57
+ - Remaining tasks overview
58
+ - Dynamic instruction from CLI
59
+
60
+ 6. **Implement tasks (loop until done or blocked)**
61
+
62
+ For each pending task:
63
+ - Show which task is being worked on
64
+ - Make the code changes required
65
+ - Keep changes minimal and focused
66
+ - Mark task complete in the tasks file: `- [ ]` → `- [x]`
67
+ - Continue to next task
68
+
69
+ **Pause if:**
70
+ - Task is unclear → ask for clarification
71
+ - Implementation reveals a design issue → suggest updating artifacts
72
+ - Error or blocker encountered → report and wait for guidance
73
+ - User interrupts
74
+
75
+ 7. **On completion or pause, show status**
76
+
77
+ Display:
78
+ - Tasks completed this session
79
+ - Overall progress: "N/M tasks complete"
80
+ - If all done: suggest archive
81
+ - If paused: explain why and wait for guidance
82
+
83
+ **Output During Implementation**
84
+
85
+ ```
86
+ ## Implementing: <change-name> (schema: <schema-name>)
87
+
88
+ Working on task 3/7: <task description>
89
+ [...implementation happening...]
90
+ ✓ Task complete
91
+
92
+ Working on task 4/7: <task description>
93
+ [...implementation happening...]
94
+ ✓ Task complete
95
+ ```
96
+
97
+ **Output On Completion**
98
+
99
+ ```
100
+ ## Implementation Complete
101
+
102
+ **Change:** <change-name>
103
+ **Schema:** <schema-name>
104
+ **Progress:** 7/7 tasks complete ✓
105
+
106
+ ### Completed This Session
107
+ - [x] Task 1
108
+ - [x] Task 2
109
+ ...
110
+
111
+ All tasks complete! You can archive this change with `/opsx-archive`.
112
+ ```
113
+
114
+ **Output On Pause (Issue Encountered)**
115
+
116
+ ```
117
+ ## Implementation Paused
118
+
119
+ **Change:** <change-name>
120
+ **Schema:** <schema-name>
121
+ **Progress:** 4/7 tasks complete
122
+
123
+ ### Issue Encountered
124
+ <description of the issue>
125
+
126
+ **Options:**
127
+ 1. <option 1>
128
+ 2. <option 2>
129
+ 3. Other approach
130
+
131
+ What would you like to do?
132
+ ```
133
+
134
+ **Guardrails**
135
+ - Keep going through tasks until done or blocked
136
+ - Always read context files before starting (from the apply instructions output)
137
+ - If task is ambiguous, pause and ask before implementing
138
+ - If implementation reveals issues, pause and suggest artifact updates
139
+ - Keep code changes minimal and scoped to each task
140
+ - Update task checkbox immediately after completing each task
141
+ - Pause on errors, blockers, or unclear requirements - don't guess
142
+ - Use contextFiles from CLI output, don't assume specific file names
143
+
144
+ **Fluid Workflow Integration**
145
+
146
+ This skill supports the "actions on a change" model:
147
+
148
+ - **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
149
+ - **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
@@ -0,0 +1,154 @@
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
+ - `artifacts`: List of artifacts with their status (`done` or other)
27
+
28
+ **If any artifacts are not `done`:**
29
+ - Display warning listing incomplete artifacts
30
+ - Prompt user for confirmation to continue
31
+ - Proceed if user confirms
32
+
33
+ 3. **Check task completion status**
34
+
35
+ Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
36
+
37
+ Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
38
+
39
+ **If incomplete tasks found:**
40
+ - Display warning showing count of incomplete tasks
41
+ - Prompt user for confirmation to continue
42
+ - Proceed if user confirms
43
+
44
+ **If no tasks file exists:** Proceed without task-related warning.
45
+
46
+ 4. **Assess delta spec sync state**
47
+
48
+ Check for delta specs at `openspec/changes/<name>/specs/`. If none exist, proceed without sync prompt.
49
+
50
+ **If delta specs exist:**
51
+ - Compare each delta spec with its corresponding main spec at `openspec/specs/<capability>/spec.md`
52
+ - Determine what changes would be applied (adds, modifications, removals, renames)
53
+ - Show a combined summary before prompting
54
+
55
+ **Prompt options:**
56
+ - If changes needed: "Sync now (recommended)", "Archive without syncing"
57
+ - If already synced: "Archive now", "Sync anyway", "Cancel"
58
+
59
+ 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.
60
+
61
+ 5. **Perform the archive**
62
+
63
+ Create the archive directory if it doesn't exist:
64
+ ```bash
65
+ mkdir -p openspec/changes/archive
66
+ ```
67
+
68
+ Generate target name using current date: `YYYY-MM-DD-<change-name>`
69
+
70
+ **Check if target already exists:**
71
+ - If yes: Fail with error, suggest renaming existing archive or using different date
72
+ - If no: Move the change directory to archive
73
+
74
+ ```bash
75
+ mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
76
+ ```
77
+
78
+ 6. **Display summary**
79
+
80
+ Show archive completion summary including:
81
+ - Change name
82
+ - Schema that was used
83
+ - Archive location
84
+ - Spec sync status (synced / sync skipped / no delta specs)
85
+ - Note about any warnings (incomplete artifacts/tasks)
86
+
87
+ **Output On Success**
88
+
89
+ ```
90
+ ## Archive Complete
91
+
92
+ **Change:** <change-name>
93
+ **Schema:** <schema-name>
94
+ **Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
95
+ **Specs:** ✓ Synced to main specs
96
+
97
+ All artifacts complete. All tasks complete.
98
+ ```
99
+
100
+ **Output On Success (No Delta Specs)**
101
+
102
+ ```
103
+ ## Archive Complete
104
+
105
+ **Change:** <change-name>
106
+ **Schema:** <schema-name>
107
+ **Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
108
+ **Specs:** No delta specs
109
+
110
+ All artifacts complete. All tasks complete.
111
+ ```
112
+
113
+ **Output On Success With Warnings**
114
+
115
+ ```
116
+ ## Archive Complete (with warnings)
117
+
118
+ **Change:** <change-name>
119
+ **Schema:** <schema-name>
120
+ **Archived to:** openspec/changes/archive/YYYY-MM-DD-<name>/
121
+ **Specs:** Sync skipped (user chose to skip)
122
+
123
+ **Warnings:**
124
+ - Archived with 2 incomplete artifacts
125
+ - Archived with 3 incomplete tasks
126
+ - Delta spec sync was skipped (user chose to skip)
127
+
128
+ Review the archive if this was not intentional.
129
+ ```
130
+
131
+ **Output On Error (Archive Exists)**
132
+
133
+ ```
134
+ ## Archive Failed
135
+
136
+ **Change:** <change-name>
137
+ **Target:** openspec/changes/archive/YYYY-MM-DD-<name>/
138
+
139
+ Target archive directory already exists.
140
+
141
+ **Options:**
142
+ 1. Rename the existing archive
143
+ 2. Delete the existing archive if it's a duplicate
144
+ 3. Wait until a different date to archive
145
+ ```
146
+
147
+ **Guardrails**
148
+ - Always prompt for change selection if not provided
149
+ - Use artifact graph (openspec status --json) for completion checking
150
+ - Don't block archive on warnings - just inform and confirm
151
+ - Preserve .openspec.yaml when moving to archive (it moves with the directory)
152
+ - Show clear summary of what happened
153
+ - If sync is requested, use the Skill tool to invoke `openspec-sync-specs` (agent-driven)
154
+ - If delta specs exist, always run the sync assessment and show the combined summary before prompting
@@ -0,0 +1,170 @@
1
+ ---
2
+ description: Enter explore mode - think through ideas, investigate problems, clarify requirements
3
+ ---
4
+
5
+ Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
6
+
7
+ **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.
8
+
9
+ **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.
10
+
11
+ **Input**: The argument after `/opsx-explore` is whatever the user wants to think about. Could be:
12
+ - A vague idea: "real-time collaboration"
13
+ - A specific problem: "the auth system is getting unwieldy"
14
+ - A change name: "add-dark-mode" (to explore in context of that change)
15
+ - A comparison: "postgres vs sqlite for this"
16
+ - Nothing (just enter explore mode)
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
+ If the user mentioned a specific change name, read its artifacts for context.
95
+
96
+ ### When no change exists
97
+
98
+ Think freely. When insights crystallize, you might offer:
99
+
100
+ - "This feels solid enough to start a change. Want me to create a proposal?"
101
+ - Or keep exploring - no pressure to formalize
102
+
103
+ ### When a change exists
104
+
105
+ If the user mentions a change or you detect one is relevant:
106
+
107
+ 1. **Read existing artifacts for context**
108
+ - `openspec/changes/<name>/proposal.md`
109
+ - `openspec/changes/<name>/design.md`
110
+ - `openspec/changes/<name>/tasks.md`
111
+ - etc.
112
+
113
+ 2. **Reference them naturally in conversation**
114
+ - "Your design mentions using Redis, but we just realized SQLite fits better..."
115
+ - "The proposal scopes this to premium users, but we're now thinking everyone..."
116
+
117
+ 3. **Offer to capture when decisions are made**
118
+
119
+ | Insight Type | Where to Capture |
120
+ |--------------|------------------|
121
+ | New requirement discovered | `specs/<capability>/spec.md` |
122
+ | Requirement changed | `specs/<capability>/spec.md` |
123
+ | Design decision made | `design.md` |
124
+ | Scope changed | `proposal.md` |
125
+ | New work identified | `tasks.md` |
126
+ | Assumption invalidated | Relevant artifact |
127
+
128
+ Example offers:
129
+ - "That's a design decision. Capture it in design.md?"
130
+ - "This is a new requirement. Add it to specs?"
131
+ - "This changes scope. Update the proposal?"
132
+
133
+ 4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
134
+
135
+ ---
136
+
137
+ ## What You Don't Have To Do
138
+
139
+ - Follow a script
140
+ - Ask the same questions every time
141
+ - Produce a specific artifact
142
+ - Reach a conclusion
143
+ - Stay on topic if a tangent is valuable
144
+ - Be brief (this is thinking time)
145
+
146
+ ---
147
+
148
+ ## Ending Discovery
149
+
150
+ There's no required ending. Discovery might:
151
+
152
+ - **Flow into a proposal**: "Ready to start? I can create a change proposal."
153
+ - **Result in artifact updates**: "Updated design.md with these decisions"
154
+ - **Just provide clarity**: User has what they need, moves on
155
+ - **Continue later**: "We can pick this up anytime"
156
+
157
+ When things crystallize, you might offer a summary - but it's optional. Sometimes the thinking IS the value.
158
+
159
+ ---
160
+
161
+ ## Guardrails
162
+
163
+ - **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
164
+ - **Don't fake understanding** - If something is unclear, dig deeper
165
+ - **Don't rush** - Discovery is thinking time, not task time
166
+ - **Don't force structure** - Let patterns emerge naturally
167
+ - **Don't auto-capture** - Offer to save insights, don't just do it
168
+ - **Do visualize** - A good diagram is worth many paragraphs
169
+ - **Do explore the codebase** - Ground discussions in reality
170
+ - **Do question assumptions** - Including the user's and your own
@@ -0,0 +1,103 @@
1
+ ---
2
+ description: Propose a new change - create it and generate all artifacts in one step
3
+ ---
4
+
5
+ Propose a new change - create the change and generate all artifacts in one step.
6
+
7
+ I'll create a change with artifacts:
8
+ - proposal.md (what & why)
9
+ - design.md (how)
10
+ - tasks.md (implementation steps)
11
+
12
+ When ready to implement, run /opsx-apply
13
+
14
+ ---
15
+
16
+ **Input**: The argument after `/opsx-propose` is the change name (kebab-case), OR a description of what the user wants to build.
17
+
18
+ **Steps**
19
+
20
+ 1. **If no input provided, ask what they want to build**
21
+
22
+ Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
23
+ > "What change do you want to work on? Describe what you want to build or fix."
24
+
25
+ From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
26
+
27
+ **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
28
+
29
+ 2. **Create the change directory**
30
+ ```bash
31
+ openspec new change "<name>"
32
+ ```
33
+ This creates a scaffolded change at `openspec/changes/<name>/` with `.openspec.yaml`.
34
+
35
+ 3. **Get the artifact build order**
36
+ ```bash
37
+ openspec status --change "<name>" --json
38
+ ```
39
+ Parse the JSON to get:
40
+ - `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
41
+ - `artifacts`: list of all artifacts with their status and dependencies
42
+
43
+ 4. **Create artifacts in sequence until apply-ready**
44
+
45
+ Use the **TodoWrite tool** to track progress through the artifacts.
46
+
47
+ Loop through artifacts in dependency order (artifacts with no pending dependencies first):
48
+
49
+ a. **For each artifact that is `ready` (dependencies satisfied)**:
50
+ - Get instructions:
51
+ ```bash
52
+ openspec instructions <artifact-id> --change "<name>" --json
53
+ ```
54
+ - The instructions JSON includes:
55
+ - `context`: Project background (constraints for you - do NOT include in output)
56
+ - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
57
+ - `template`: The structure to use for your output file
58
+ - `instruction`: Schema-specific guidance for this artifact type
59
+ - `outputPath`: Where to write the artifact
60
+ - `dependencies`: Completed artifacts to read for context
61
+ - Read any completed dependency files for context
62
+ - Create the artifact file using `template` as the structure
63
+ - Apply `context` and `rules` as constraints - but do NOT copy them into the file
64
+ - Show brief progress: "Created <artifact-id>"
65
+
66
+ b. **Continue until all `applyRequires` artifacts are complete**
67
+ - After creating each artifact, re-run `openspec status --change "<name>" --json`
68
+ - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
69
+ - Stop when all `applyRequires` artifacts are done
70
+
71
+ c. **If an artifact requires user input** (unclear context):
72
+ - Use **AskUserQuestion tool** to clarify
73
+ - Then continue with creation
74
+
75
+ 5. **Show final status**
76
+ ```bash
77
+ openspec status --change "<name>"
78
+ ```
79
+
80
+ **Output**
81
+
82
+ After completing all artifacts, summarize:
83
+ - Change name and location
84
+ - List of artifacts created with brief descriptions
85
+ - What's ready: "All artifacts created! Ready for implementation."
86
+ - Prompt: "Run `/opsx-apply` to start implementing."
87
+
88
+ **Artifact Creation Guidelines**
89
+
90
+ - Follow the `instruction` field from `openspec instructions` for each artifact type
91
+ - The schema defines what each artifact should contain - follow it
92
+ - Read dependency artifacts for context before creating new ones
93
+ - Use `template` as the structure for your output file - fill in its sections
94
+ - **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
95
+ - Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
96
+ - These guide what you write, but should never appear in the output
97
+
98
+ **Guardrails**
99
+ - Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
100
+ - Always read dependency artifacts before creating a new one
101
+ - If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
102
+ - If a change with that name already exists, ask if user wants to continue it or create a new one
103
+ - Verify each artifact file exists after writing before proceeding to next