resolve-solo 0.3.0 → 0.5.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.
package/README.md CHANGED
@@ -1,42 +1,120 @@
1
1
  # Resolve Solo
2
2
 
3
- A local-first CLI on-call assistant for individual developers. Natural language investigation support with timeline analysis, incident recall, and reporting—all demo-grade with mock data.
3
+ A local-first on-call assistant for individual developers. Natural language investigation support with timeline analysis, incident recall, and reporting—powered by demo data, ready for Claude Code integration.
4
4
 
5
- ## Quick Start
5
+ ## Three Ways to Use Resolve Solo
6
+
7
+ ### 1. Claude Code Integration (Recommended)
6
8
 
7
- Try the demo with a single command:
9
+ Talk naturally to Claude Code, and it automatically invokes resolve-solo when you need incident investigation:
8
10
 
9
11
  ```bash
10
- npx resolve-solo demo
12
+ # One-time setup
13
+ npm install -g resolve-solo
14
+ resolveai setup
15
+
16
+ # Then in Claude Code, just talk naturally:
17
+ "investigate timeout issues in payment service"
18
+ "what changed in the last hour?"
19
+ "show me similar past incidents"
11
20
  ```
12
21
 
13
- This will:
14
- - Seed realistic demo data (incidents, deploys, logs, services)
15
- - Run an automated investigation
16
- - Show you what Resolve Solo can do
22
+ **How it works**: Resolve Solo exposes MCP (Model Context Protocol) tools that Claude Code automatically discovers and uses when you ask incident-related questions.
17
23
 
18
- ## Installation
24
+ 👉 See [CLAUDE_CODE_INTEGRATION.md](./CLAUDE_CODE_INTEGRATION.md) for detailed setup
19
25
 
20
- ### Option 1: Run directly via npx (Recommended)
26
+ ### 2. Interactive REPL Mode
21
27
 
22
- No installation needed! Just run:
28
+ Type commands without the `resolveai` prefix in an interactive session:
23
29
 
24
30
  ```bash
25
- npx resolve-solo <command>
31
+ # Start interactive mode
32
+ resolveai
33
+
34
+ # Now you're in the REPL
35
+ resolve-ai> investigate database errors
36
+ resolve-ai [abc12345]> show details for item 1
37
+ resolve-ai [abc12345]> note found connection pool leak
38
+ resolve-ai [abc12345]> close fixed by increasing pool size
39
+ resolve-ai> exit
26
40
  ```
27
41
 
28
- ### Option 2: Install globally from npm
42
+ **Benefits**: Session-aware prompts, command history, no need to type `resolveai` every time.
43
+
44
+ ### 3. Single-Command CLI Mode
45
+
46
+ Traditional CLI mode for one-off commands or scripts:
47
+
48
+ ```bash
49
+ resolveai demo
50
+ resolveai investigate timeouts
51
+ resolveai show details for item 3
52
+ resolveai help
53
+ ```
54
+
55
+ **Benefits**: Perfect for scripts, automation, or if you prefer traditional CLI workflows.
56
+
57
+ ## Quick Start
58
+
59
+ ### Install
29
60
 
30
61
  ```bash
31
62
  npm install -g resolve-solo
32
63
  ```
33
64
 
34
- Then use the `resolveai` command:
65
+ ### Option A: Setup for Claude Code
66
+
67
+ ```bash
68
+ resolveai setup
69
+ # ✓ Configured Claude Code integration
70
+ # ✓ Restart Claude Code and start investigating!
71
+ ```
72
+
73
+ Then in Claude Code:
74
+ ```
75
+ User: "investigate timeout issues in payment service"
76
+ Claude: [Automatically calls resolve-solo investigation tool]
77
+ ```
78
+
79
+ ### Option B: Try the Demo (CLI or REPL)
35
80
 
81
+ **CLI mode**:
36
82
  ```bash
37
83
  resolveai demo
38
84
  ```
39
85
 
86
+ **REPL mode**:
87
+ ```bash
88
+ resolveai
89
+ resolve-ai> demo
90
+ ```
91
+
92
+ This will:
93
+ - Seed realistic demo data (incidents, deploys, logs, services)
94
+ - Run an automated investigation
95
+ - Show you what Resolve Solo can do
96
+
97
+ ## Installation Options
98
+
99
+ ### Option 1: Install globally from npm (Recommended)
100
+
101
+ ```bash
102
+ npm install -g resolve-solo
103
+ ```
104
+
105
+ Then use the short `resolveai` command in any of the three modes.
106
+
107
+ ### Option 2: Run directly via npx (No install)
108
+
109
+ Try it without installing:
110
+
111
+ ```bash
112
+ npx resolve-solo demo
113
+ npx resolve-solo investigate timeouts
114
+ ```
115
+
116
+ **Note**: `npx` doesn't support REPL or Claude Code modes. For those, install globally.
117
+
40
118
  ### Option 3: Install from GitHub (Enterprise)
41
119
 
42
120
  For development or enterprise GitHub:
@@ -46,11 +124,11 @@ npm install -g git+https://github.cbhq.net/srinath-sinha/resolve-solo
46
124
  resolveai demo
47
125
  ```
48
126
 
49
- ## Usage
127
+ ## Commands
50
128
 
51
129
  Resolve Solo uses **natural language** commands—no flags needed.
52
130
 
53
- ### Try these commands:
131
+ ### Common Commands
54
132
 
55
133
  ```bash
56
134
  # See what Resolve Solo can do
@@ -59,8 +137,12 @@ resolveai demo
59
137
  # Get help
60
138
  resolveai help
61
139
 
140
+ # Configure Claude Code integration
141
+ resolveai setup
142
+
62
143
  # Investigate an issue (demo mode)
63
- resolveai investigate timeouts
144
+ resolveai investigate timeouts in payment service
145
+ resolveai investigate database connection errors
64
146
 
65
147
  # Show details for a timeline item
66
148
  resolveai show details for item 3
@@ -71,19 +153,27 @@ resolveai note checking database connection pool
71
153
  # Close an investigation
72
154
  resolveai close fixed connection pool size
73
155
 
74
- # Generate weekly report
156
+ # Generate demo data
157
+ resolveai demo seed
158
+ resolveai demo reset
159
+ ```
160
+
161
+ ### Advanced Commands (Coming Soon)
162
+
163
+ ```bash
164
+ # Generate weekly report (M8)
75
165
  resolveai report weekly
76
166
 
77
- # Check system health
167
+ # Check system health (M10)
78
168
  resolveai doctor
79
169
 
80
- # Uninstall
170
+ # Uninstall (M9)
81
171
  resolveai uninstall
82
172
  ```
83
173
 
84
174
  ## What You'll See
85
175
 
86
- When you run `resolveai demo`, you'll get:
176
+ When you run `resolveai demo` or use the investigate tool from Claude Code:
87
177
 
88
178
  **A) What changed recently** - Timeline of deploys, errors, and past incidents
89
179
  **B) Where to look next** - Investigation paths with confidence levels
@@ -99,28 +189,56 @@ Resolve Solo stores all data locally in `./.resolveai/`:
99
189
  ```
100
190
  .resolveai/
101
191
  ├── demo-data/ # Demo dataset (services, deploys, logs, incidents)
102
- ├── runs/ # Investigation sessions (created in M6+)
103
- ├── memory.sqlite # Incident recall database (created in M6+)
104
- └── reports/ # Weekly reports (created in M8+)
192
+ └── memory.sqlite # Investigation sessions and incident recall
105
193
  ```
106
194
 
107
- Export your demo data:
195
+ The data is local-first and portable:
108
196
 
109
197
  ```bash
110
- # See where demo data is stored
111
- resolveai doctor
198
+ # See storage location
199
+ ls -la .resolveai/
112
200
 
113
- # Copy demo data elsewhere
114
- cp -r .resolveai/demo-data ~/my-demo-backup/
201
+ # Copy data elsewhere
202
+ cp -r .resolveai ~/my-backup/
115
203
 
116
204
  # Reset demo data
117
205
  resolveai demo reset
118
206
  ```
119
207
 
208
+ ## Architecture
209
+
210
+ ### Mode Detection
211
+
212
+ ```
213
+ resolveai --mcp → MCP Server (Claude Code integration)
214
+ resolveai → Interactive REPL
215
+ resolveai <command> → Single-command CLI
216
+ ```
217
+
218
+ ### Shared Handler Architecture
219
+
220
+ All three modes call the same business logic handlers, ensuring consistent behavior:
221
+
222
+ ```
223
+ CLI Mode →
224
+ REPL Mode → Shared Handlers → Database/Storage
225
+ MCP Mode →
226
+ ```
227
+
228
+ ### Technology Stack
229
+
230
+ - **Language**: TypeScript (compiled to ESM JavaScript)
231
+ - **Test Framework**: Vitest
232
+ - **MCP Integration**: @modelcontextprotocol/sdk
233
+ - **CLI**: Natural language parser (no flag dependencies)
234
+ - **Data**: Deterministic mock generation + SQLite persistence
235
+ - **Storage**: JSON files + SQLite
236
+
120
237
  ## Requirements
121
238
 
122
239
  - **Node.js 18+** (uses ES modules)
123
240
  - Runs on macOS, Linux, Windows
241
+ - **Claude Code** (optional, for MCP integration)
124
242
 
125
243
  ## Development
126
244
 
@@ -149,47 +267,79 @@ npm run typecheck
149
267
 
150
268
  ## Current Status
151
269
 
152
- **Version**: 0.1.0 (Demo Release)
153
- **Milestones Complete**: M1-M4 (4/12)
270
+ **Version**: 0.4.0 (in development)
271
+ **Milestones Complete**: M1-M7, M12 (8/12)
154
272
 
155
- - M1: Project Foundation
156
- - ✅ M2: CLI Entry & Help
157
- - ✅ M3: Demo Data System
158
- - ✅ M4: Flow A - First-Time Demo
159
- - 🚧 M5-M11: Interactive investigation, sessions, reports (planned)
273
+ ### Completed Features
274
+
275
+ - ✅ **M1-M4**: Foundation, CLI, Demo Data, First-Time Demo
276
+ - ✅ **M5-M6**: Investigation Core, Session Persistence
277
+ - **M7**: Dual-Mode UX (REPL + MCP Server)
278
+ - ✅ **M12**: Distribution & Publishing
279
+
280
+ ### What Works Now
281
+
282
+ - ✅ Complete investigation workflow with session tracking
283
+ - ✅ Timeline analysis with relevance filtering
284
+ - ✅ Investigation notes and session closure
285
+ - ✅ Persistent storage with SQLite
286
+ - ✅ **Interactive REPL mode with session awareness**
287
+ - ✅ **Claude Code integration via MCP**
288
+ - ✅ **Automatic setup command**
289
+
290
+ ### Coming Soon
291
+
292
+ - 🚧 **M8**: Weekly Reports (IT/Security value proof)
293
+ - 🚧 **M9**: Uninstall Experience
294
+ - 🚧 **M10**: Doctor Command (system health)
295
+ - 🚧 **M11**: Polish & Testing
160
296
 
161
297
  **This is a demo release** - all investigations use mock data. Real integrations with observability tools (Datadog, Sentry, PagerDuty, etc.) are planned for future releases.
162
298
 
299
+ ## Claude Code Integration
300
+
301
+ The MCP server exposes 5 tools to Claude Code:
302
+
303
+ 1. **investigate** - Start investigation for an incident
304
+ 2. **get_details** - Show timeline item details
305
+ 3. **add_note** - Add note to investigation
306
+ 4. **close_incident** - Close investigation with resolution
307
+ 5. **generate_report** - Weekly incident report (coming in M8)
308
+
309
+ When properly configured, Claude Code automatically calls these tools when you ask incident-related questions in natural language.
310
+
311
+ See [CLAUDE_CODE_INTEGRATION.md](./CLAUDE_CODE_INTEGRATION.md) for:
312
+ - How tool discovery works
313
+ - Setup instructions (automatic + manual)
314
+ - Troubleshooting guide
315
+ - Examples of what triggers the tools
316
+
163
317
  ## Uninstall
164
318
 
165
319
  To remove Resolve Solo:
166
320
 
167
321
  ```bash
168
- # If installed globally
322
+ # Run uninstall command (M9 - coming soon)
169
323
  resolveai uninstall
170
324
 
171
325
  # Or manually
172
- npm uninstall -g resolve-solo # or github:srinathsinha/resolve-solo
326
+ npm uninstall -g resolve-solo
327
+
328
+ # Remove Claude Code integration
329
+ resolveai setup # Will detect and offer to remove
173
330
 
174
331
  # Remove local data (optional)
175
332
  rm -rf .resolveai
176
333
  ```
177
334
 
178
- ## Architecture
179
-
180
- - **Language**: TypeScript (compiled to ESM JavaScript)
181
- - **Test Framework**: Vitest
182
- - **CLI**: Natural language parser (no flag dependencies)
183
- - **Data**: Deterministic mock generation (same seed = identical output)
184
- - **Storage**: JSON files + SQLite (planned)
185
-
186
335
  ## Documentation
187
336
 
337
+ - **[CLAUDE_CODE_INTEGRATION.md](./CLAUDE_CODE_INTEGRATION.md)** - Complete MCP integration guide
188
338
  - `SPEC.md` - Requirements specification
189
339
  - `PLAN.md` - Implementation milestones
190
340
  - `DECISIONS.md` - Key technical decisions
191
341
  - `CHANGELOG.md` - Progress log
192
- - `BUGLOG.md` - Bug tracking
342
+ - `STATUS.md` - Current status
193
343
  - `CONTEXT.md` - Cross-session context
194
344
 
195
345
  ## License
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AA6BH,wBAAsB,IAAI,CAAC,IAAI,GAAE,MAAM,EAA0B,iBAgEhE"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AAeH,wBAAsB,IAAI,CAAC,IAAI,GAAE,MAAM,EAA0B,iBAmBhE"}