@synth-coder/memhub 0.2.4 → 0.2.5

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 (53) hide show
  1. package/.eslintrc.cjs +45 -45
  2. package/.factory/commands/opsx-apply.md +150 -150
  3. package/.factory/commands/opsx-archive.md +155 -155
  4. package/.factory/commands/opsx-explore.md +171 -171
  5. package/.factory/commands/opsx-propose.md +104 -104
  6. package/.factory/skills/openspec-apply-change/SKILL.md +156 -156
  7. package/.factory/skills/openspec-archive-change/SKILL.md +114 -114
  8. package/.factory/skills/openspec-explore/SKILL.md +288 -288
  9. package/.factory/skills/openspec-propose/SKILL.md +110 -110
  10. package/.github/workflows/ci.yml +110 -110
  11. package/.github/workflows/release.yml +3 -0
  12. package/.iflow/commands/opsx-apply.md +152 -152
  13. package/.iflow/commands/opsx-archive.md +157 -157
  14. package/.iflow/commands/opsx-explore.md +173 -173
  15. package/.iflow/commands/opsx-propose.md +106 -106
  16. package/.iflow/skills/openspec-apply-change/SKILL.md +156 -156
  17. package/.iflow/skills/openspec-archive-change/SKILL.md +114 -114
  18. package/.iflow/skills/openspec-explore/SKILL.md +288 -288
  19. package/.iflow/skills/openspec-propose/SKILL.md +110 -110
  20. package/.prettierrc +11 -11
  21. package/AGENTS.md +167 -167
  22. package/README.md +17 -9
  23. package/README.zh-CN.md +246 -238
  24. package/dist/src/cli/agents/index.d.ts +0 -1
  25. package/dist/src/cli/agents/index.d.ts.map +1 -1
  26. package/dist/src/cli/agents/index.js +0 -3
  27. package/dist/src/cli/agents/index.js.map +1 -1
  28. package/dist/src/cli/index.js +0 -0
  29. package/dist/src/cli/init.d.ts.map +1 -1
  30. package/dist/src/cli/init.js +4 -24
  31. package/dist/src/cli/init.js.map +1 -1
  32. package/dist/src/cli/types.d.ts +2 -2
  33. package/dist/src/cli/types.d.ts.map +1 -1
  34. package/dist/src/cli/types.js +0 -11
  35. package/dist/src/cli/types.js.map +1 -1
  36. package/docs/user-guide.md +8 -6
  37. package/package.json +16 -16
  38. package/src/cli/agents/claude-code.ts +1 -1
  39. package/src/cli/agents/cline.ts +1 -1
  40. package/src/cli/agents/codex.ts +2 -2
  41. package/src/cli/agents/cursor.ts +1 -1
  42. package/src/cli/agents/factory-droid.ts +1 -1
  43. package/src/cli/agents/gemini-cli.ts +1 -1
  44. package/src/cli/agents/windsurf.ts +1 -1
  45. package/src/cli/init.ts +14 -14
  46. package/test/cli/init.test.ts +23 -1
  47. package/tsconfig.json +25 -25
  48. package/tsconfig.test.json +8 -8
  49. package/vitest.config.ts +29 -29
  50. package/dist/src/cli/agents/codex.d.ts +0 -5
  51. package/dist/src/cli/agents/codex.d.ts.map +0 -1
  52. package/dist/src/cli/agents/codex.js +0 -14
  53. package/dist/src/cli/agents/codex.js.map +0 -1
@@ -1,288 +1,288 @@
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.2.0"
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. **Read existing artifacts for context**
106
- - `openspec/changes/<name>/proposal.md`
107
- - `openspec/changes/<name>/design.md`
108
- - `openspec/changes/<name>/tasks.md`
109
- - etc.
110
-
111
- 2. **Reference them naturally in conversation**
112
- - "Your design mentions using Redis, but we just realized SQLite fits better..."
113
- - "The proposal scopes this to premium users, but we're now thinking everyone..."
114
-
115
- 3. **Offer to capture when decisions are made**
116
-
117
- | Insight Type | Where to Capture |
118
- |--------------|------------------|
119
- | New requirement discovered | `specs/<capability>/spec.md` |
120
- | Requirement changed | `specs/<capability>/spec.md` |
121
- | Design decision made | `design.md` |
122
- | Scope changed | `proposal.md` |
123
- | New work identified | `tasks.md` |
124
- | Assumption invalidated | Relevant artifact |
125
-
126
- Example offers:
127
- - "That's a design decision. Capture it in design.md?"
128
- - "This is a new requirement. Add it to specs?"
129
- - "This changes scope. Update the proposal?"
130
-
131
- 4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
132
-
133
- ---
134
-
135
- ## What You Don't Have To Do
136
-
137
- - Follow a script
138
- - Ask the same questions every time
139
- - Produce a specific artifact
140
- - Reach a conclusion
141
- - Stay on topic if a tangent is valuable
142
- - Be brief (this is thinking time)
143
-
144
- ---
145
-
146
- ## Handling Different Entry Points
147
-
148
- **User brings a vague idea:**
149
- ```
150
- User: I'm thinking about adding real-time collaboration
151
-
152
- You: Real-time collab is a big space. Let me think about this...
153
-
154
- COLLABORATION SPECTRUM
155
- ════════════════════════════════════════════
156
-
157
- Awareness Coordination Sync
158
- │ │ │
159
- ▼ ▼ ▼
160
- ┌────────┐ ┌────────┐ ┌────────┐
161
- │Presence│ │Cursors │ │ CRDT │
162
- │ "3 │ │ Multi │ │Conflict│
163
- │online" │ │ select │ │ free │
164
- └────────┘ └────────┘ └────────┘
165
- │ │ │
166
- trivial moderate complex
167
-
168
- Where's your head at?
169
- ```
170
-
171
- **User brings a specific problem:**
172
- ```
173
- User: The auth system is a mess
174
-
175
- You: [reads codebase]
176
-
177
- ┌─────────────────────────────────────────────┐
178
- │ CURRENT AUTH FLOW │
179
- └─────────────────────────────────────────────┘
180
-
181
- ┌─────────────┼─────────────┐
182
- ▼ ▼ ▼
183
- ┌─────────┐ ┌─────────┐ ┌─────────┐
184
- │ Google │ │ GitHub │ │ Email │
185
- │ OAuth │ │ OAuth │ │ Magic │
186
- └────┬────┘ └────┬────┘ └────┬────┘
187
- │ │ │
188
- └─────────────┼─────────────┘
189
-
190
- ┌───────────┐
191
- │ Session │
192
- └─────┬─────┘
193
-
194
-
195
- ┌───────────┐
196
- │ Perms │
197
- └───────────┘
198
-
199
- I see three tangles. Which one's burning?
200
- ```
201
-
202
- **User is stuck mid-implementation:**
203
- ```
204
- User: /opsx:explore add-auth-system
205
- The OAuth integration is more complex than expected
206
-
207
- You: [reads change artifacts]
208
-
209
- You're on task 4: "Implement OAuth flow"
210
-
211
- Let me trace what's involved...
212
-
213
- [draws diagram, explores options, suggests paths]
214
-
215
- Want to update the design to reflect this?
216
- Or add a spike task to investigate?
217
- ```
218
-
219
- **User wants to compare options:**
220
- ```
221
- User: Should we use Postgres or SQLite?
222
-
223
- You: Generic answer is boring. What's the context?
224
-
225
- User: A CLI tool that tracks local dev environments
226
-
227
- You: That changes everything.
228
-
229
- ┌─────────────────────────────────────────────────┐
230
- │ CLI TOOL DATA STORAGE │
231
- └─────────────────────────────────────────────────┘
232
-
233
- Key constraints:
234
- • No daemon running
235
- • Must work offline
236
- • Single user
237
-
238
- SQLite Postgres
239
- Deployment embedded ✓ needs server ✗
240
- Offline yes ✓ no ✗
241
- Single file yes ✓ no ✗
242
-
243
- SQLite. Not even close.
244
-
245
- Unless... is there a sync component?
246
- ```
247
-
248
- ---
249
-
250
- ## Ending Discovery
251
-
252
- There's no required ending. Discovery might:
253
-
254
- - **Flow into a proposal**: "Ready to start? I can create a change proposal."
255
- - **Result in artifact updates**: "Updated design.md with these decisions"
256
- - **Just provide clarity**: User has what they need, moves on
257
- - **Continue later**: "We can pick this up anytime"
258
-
259
- When it feels like things are crystallizing, you might summarize:
260
-
261
- ```
262
- ## What We Figured Out
263
-
264
- **The problem**: [crystallized understanding]
265
-
266
- **The approach**: [if one emerged]
267
-
268
- **Open questions**: [if any remain]
269
-
270
- **Next steps** (if ready):
271
- - Create a change proposal
272
- - Keep exploring: just keep talking
273
- ```
274
-
275
- But this summary is optional. Sometimes the thinking IS the value.
276
-
277
- ---
278
-
279
- ## Guardrails
280
-
281
- - **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
282
- - **Don't fake understanding** - If something is unclear, dig deeper
283
- - **Don't rush** - Discovery is thinking time, not task time
284
- - **Don't force structure** - Let patterns emerge naturally
285
- - **Don't auto-capture** - Offer to save insights, don't just do it
286
- - **Do visualize** - A good diagram is worth many paragraphs
287
- - **Do explore the codebase** - Ground discussions in reality
288
- - **Do question assumptions** - Including the user's and your own
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.2.0"
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. **Read existing artifacts for context**
106
+ - `openspec/changes/<name>/proposal.md`
107
+ - `openspec/changes/<name>/design.md`
108
+ - `openspec/changes/<name>/tasks.md`
109
+ - etc.
110
+
111
+ 2. **Reference them naturally in conversation**
112
+ - "Your design mentions using Redis, but we just realized SQLite fits better..."
113
+ - "The proposal scopes this to premium users, but we're now thinking everyone..."
114
+
115
+ 3. **Offer to capture when decisions are made**
116
+
117
+ | Insight Type | Where to Capture |
118
+ |--------------|------------------|
119
+ | New requirement discovered | `specs/<capability>/spec.md` |
120
+ | Requirement changed | `specs/<capability>/spec.md` |
121
+ | Design decision made | `design.md` |
122
+ | Scope changed | `proposal.md` |
123
+ | New work identified | `tasks.md` |
124
+ | Assumption invalidated | Relevant artifact |
125
+
126
+ Example offers:
127
+ - "That's a design decision. Capture it in design.md?"
128
+ - "This is a new requirement. Add it to specs?"
129
+ - "This changes scope. Update the proposal?"
130
+
131
+ 4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
132
+
133
+ ---
134
+
135
+ ## What You Don't Have To Do
136
+
137
+ - Follow a script
138
+ - Ask the same questions every time
139
+ - Produce a specific artifact
140
+ - Reach a conclusion
141
+ - Stay on topic if a tangent is valuable
142
+ - Be brief (this is thinking time)
143
+
144
+ ---
145
+
146
+ ## Handling Different Entry Points
147
+
148
+ **User brings a vague idea:**
149
+ ```
150
+ User: I'm thinking about adding real-time collaboration
151
+
152
+ You: Real-time collab is a big space. Let me think about this...
153
+
154
+ COLLABORATION SPECTRUM
155
+ ════════════════════════════════════════════
156
+
157
+ Awareness Coordination Sync
158
+ │ │ │
159
+ ▼ ▼ ▼
160
+ ┌────────┐ ┌────────┐ ┌────────┐
161
+ │Presence│ │Cursors │ │ CRDT │
162
+ │ "3 │ │ Multi │ │Conflict│
163
+ │online" │ │ select │ │ free │
164
+ └────────┘ └────────┘ └────────┘
165
+ │ │ │
166
+ trivial moderate complex
167
+
168
+ Where's your head at?
169
+ ```
170
+
171
+ **User brings a specific problem:**
172
+ ```
173
+ User: The auth system is a mess
174
+
175
+ You: [reads codebase]
176
+
177
+ ┌─────────────────────────────────────────────┐
178
+ │ CURRENT AUTH FLOW │
179
+ └─────────────────────────────────────────────┘
180
+
181
+ ┌─────────────┼─────────────┐
182
+ ▼ ▼ ▼
183
+ ┌─────────┐ ┌─────────┐ ┌─────────┐
184
+ │ Google │ │ GitHub │ │ Email │
185
+ │ OAuth │ │ OAuth │ │ Magic │
186
+ └────┬────┘ └────┬────┘ └────┬────┘
187
+ │ │ │
188
+ └─────────────┼─────────────┘
189
+
190
+ ┌───────────┐
191
+ │ Session │
192
+ └─────┬─────┘
193
+
194
+
195
+ ┌───────────┐
196
+ │ Perms │
197
+ └───────────┘
198
+
199
+ I see three tangles. Which one's burning?
200
+ ```
201
+
202
+ **User is stuck mid-implementation:**
203
+ ```
204
+ User: /opsx:explore add-auth-system
205
+ The OAuth integration is more complex than expected
206
+
207
+ You: [reads change artifacts]
208
+
209
+ You're on task 4: "Implement OAuth flow"
210
+
211
+ Let me trace what's involved...
212
+
213
+ [draws diagram, explores options, suggests paths]
214
+
215
+ Want to update the design to reflect this?
216
+ Or add a spike task to investigate?
217
+ ```
218
+
219
+ **User wants to compare options:**
220
+ ```
221
+ User: Should we use Postgres or SQLite?
222
+
223
+ You: Generic answer is boring. What's the context?
224
+
225
+ User: A CLI tool that tracks local dev environments
226
+
227
+ You: That changes everything.
228
+
229
+ ┌─────────────────────────────────────────────────┐
230
+ │ CLI TOOL DATA STORAGE │
231
+ └─────────────────────────────────────────────────┘
232
+
233
+ Key constraints:
234
+ • No daemon running
235
+ • Must work offline
236
+ • Single user
237
+
238
+ SQLite Postgres
239
+ Deployment embedded ✓ needs server ✗
240
+ Offline yes ✓ no ✗
241
+ Single file yes ✓ no ✗
242
+
243
+ SQLite. Not even close.
244
+
245
+ Unless... is there a sync component?
246
+ ```
247
+
248
+ ---
249
+
250
+ ## Ending Discovery
251
+
252
+ There's no required ending. Discovery might:
253
+
254
+ - **Flow into a proposal**: "Ready to start? I can create a change proposal."
255
+ - **Result in artifact updates**: "Updated design.md with these decisions"
256
+ - **Just provide clarity**: User has what they need, moves on
257
+ - **Continue later**: "We can pick this up anytime"
258
+
259
+ When it feels like things are crystallizing, you might summarize:
260
+
261
+ ```
262
+ ## What We Figured Out
263
+
264
+ **The problem**: [crystallized understanding]
265
+
266
+ **The approach**: [if one emerged]
267
+
268
+ **Open questions**: [if any remain]
269
+
270
+ **Next steps** (if ready):
271
+ - Create a change proposal
272
+ - Keep exploring: just keep talking
273
+ ```
274
+
275
+ But this summary is optional. Sometimes the thinking IS the value.
276
+
277
+ ---
278
+
279
+ ## Guardrails
280
+
281
+ - **Don't implement** - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
282
+ - **Don't fake understanding** - If something is unclear, dig deeper
283
+ - **Don't rush** - Discovery is thinking time, not task time
284
+ - **Don't force structure** - Let patterns emerge naturally
285
+ - **Don't auto-capture** - Offer to save insights, don't just do it
286
+ - **Do visualize** - A good diagram is worth many paragraphs
287
+ - **Do explore the codebase** - Ground discussions in reality
288
+ - **Do question assumptions** - Including the user's and your own