@mc1global/opencode-jarvis 0.10.0 → 0.12.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
@@ -4,31 +4,44 @@ A native [OpenCode](https://opencode.ai) plugin providing multi-agent developmen
4
4
 
5
5
  Built with **Domain-Driven Design**, **SOLID principles**, and strict TypeScript.
6
6
 
7
+ ---
8
+
7
9
  ## Prerequisites
8
10
 
9
- | Requirement | Purpose | Required? |
10
- |---|---|---|
11
- | [OpenCode](https://opencode.ai) CLI | Host runtime for the plugin | **Yes** |
12
- | [Bun](https://bun.sh) >= 1.0 | Production runtime (bun:sqlite, MCP server) | **Yes** |
13
- | Node.js >= 20 | Test runner (Jest + ESM) | Dev only |
14
- | [Ollama](https://ollama.ai) | Local embedding generation for RAG | For RAG features |
15
- | `embeddinggemma` model | Default embedding model (768 dims) | For RAG features |
16
- | [Dagger CLI](https://docs.dagger.io/install) | Container-based CI/CD gate execution | Optional |
17
- | [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) | Azure DevOps board sync | Optional |
11
+ - **[OpenCode](https://opencode.ai) CLI** Host runtime for the plugin (**required**)
12
+ - **[Bun](https://bun.sh) >= 1.0** — Production runtime for bun:sqlite (**required**)
13
+ - **[Ollama](https://ollama.ai)** + `embeddinggemma` model Local embeddings for RAG semantic search (**required for RAG**)
14
+ - **Node.js >= 20** Test runner only (dev)
15
+ - **[Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)** Azure DevOps board sync (optional)
16
+ - **[Dagger CLI](https://docs.dagger.io/install)** Container CI/CD gate execution (optional)
17
+
18
+ ---
18
19
 
19
20
  ## Quick Start
20
21
 
21
- ### 1. Install prerequisites
22
+ ### Step 1 Install prerequisites
23
+
24
+ Choose your operating system below. Each section includes both **manual commands** and a link to an **automated setup script** that handles everything.
25
+
26
+ #### macOS
27
+
28
+ **Automated** (recommended):
29
+
30
+ ```bash
31
+ curl -fsSL https://raw.githubusercontent.com/user/repo/main/scripts/setup/setup-macos.sh | bash
32
+ ```
33
+
34
+ Or download `scripts/setup/setup-macos.sh` from the repository and run it locally.
22
35
 
23
- **macOS:**
36
+ **Manual:**
24
37
 
25
38
  ```bash
26
39
  # Bun (required — SQLite runtime)
27
40
  curl -fsSL https://bun.sh/install | bash
28
41
 
29
- # Ollama (required RAG semantic search)
42
+ # Ollama + embedding model (required for RAG)
30
43
  brew install ollama
31
- ollama serve # start the server
44
+ ollama serve # start the server (keep running)
32
45
  ollama pull embeddinggemma # download the embedding model
33
46
 
34
47
  # Optional: Azure DevOps sync
@@ -38,42 +51,174 @@ brew install azure-cli && az login
38
51
  brew install dagger/tap/dagger
39
52
  ```
40
53
 
41
- **Linux:**
54
+ #### Linux (Ubuntu/Debian/Fedora/Arch)
55
+
56
+ **Automated** (recommended):
57
+
58
+ ```bash
59
+ curl -fsSL https://raw.githubusercontent.com/user/repo/main/scripts/setup/setup-linux.sh | bash
60
+ ```
61
+
62
+ Or download `scripts/setup/setup-linux.sh` from the repository and run it locally.
63
+
64
+ **Manual:**
65
+
66
+ ```bash
67
+ # Bun (required)
68
+ curl -fsSL https://bun.sh/install | bash
69
+
70
+ # Ollama + embedding model (required for RAG)
71
+ curl -fsSL https://ollama.ai/install.sh | sh
72
+ ollama serve # start the server (keep running)
73
+ ollama pull embeddinggemma # download the embedding model
74
+
75
+ # Optional: Azure CLI (Debian/Ubuntu)
76
+ curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash && az login
77
+
78
+ # Optional: Dagger CLI
79
+ curl -fsSL https://dl.dagger.io/dagger/install.sh | sh
80
+ ```
81
+
82
+ #### Windows (WSL)
83
+
84
+ > OpenCode recommends Windows Subsystem for Linux (WSL) for the best experience.
85
+ > See the [OpenCode WSL guide](https://opencode.ai/docs/windows-wsl) for details.
86
+
87
+ **Step 0 — Install WSL** (if you haven't already):
88
+
89
+ Open **PowerShell as Administrator** and run:
90
+
91
+ ```powershell
92
+ wsl --install
93
+ ```
94
+
95
+ Restart your computer, then open the **Ubuntu** terminal app.
96
+
97
+ **Step 1 — Run the setup script inside WSL:**
98
+
99
+ ```bash
100
+ # From your WSL terminal (Ubuntu):
101
+ curl -fsSL https://raw.githubusercontent.com/user/repo/main/scripts/setup/setup-wsl.sh | bash
102
+ ```
103
+
104
+ Or download `scripts/setup/setup-wsl.sh` from the repository and run it inside WSL.
105
+
106
+ **Manual (inside WSL terminal):**
42
107
 
43
108
  ```bash
109
+ # OpenCode CLI
110
+ curl -fsSL https://opencode.ai/install | bash
111
+
112
+ # Bun (required)
44
113
  curl -fsSL https://bun.sh/install | bash
114
+
115
+ # Ollama + embedding model (required for RAG)
45
116
  curl -fsSL https://ollama.ai/install.sh | sh
46
- ollama serve && ollama pull embeddinggemma
117
+ ollama serve # start the server (keep running in a separate terminal)
118
+ ollama pull embeddinggemma # download the embedding model
119
+
120
+ # Optional: Azure CLI
121
+ curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash && az login
47
122
  ```
48
123
 
49
- ### 2. Add the plugin to your project
124
+ > **WSL performance tip:** For best results, keep your project files in the WSL
125
+ > filesystem (`~/code/my-project`) rather than on `/mnt/c/`. See
126
+ > [OpenCode WSL docs](https://opencode.ai/docs/windows-wsl) for more.
127
+
128
+ ---
50
129
 
51
- Create `opencode.json` in your project root:
130
+ ### Step 2 — Add the plugin to your project
131
+
132
+ Create an `opencode.json` file **in your project root directory**:
133
+
134
+ ```
135
+ your-project/ <-- your project root
136
+ opencode.json <-- CREATE THIS FILE HERE
137
+ package.json
138
+ src/
139
+ ...
140
+ ```
141
+
142
+ Content of `opencode.json`:
52
143
 
53
144
  ```json
54
145
  {
55
- "plugin": ["@mc1global/opencode-jarvis"]
146
+ "$schema": "https://opencode.ai/config.json",
147
+ "plugin": ["@mc1global/opencode-jarvis"],
148
+ "command": {
149
+ "config": {
150
+ "template": "Use JARVIS config tools to view and modify configuration. Run config-read to show current settings, then config-write to apply changes. $ARGUMENTS",
151
+ "description": "View or modify JARVIS configuration"
152
+ },
153
+ "healthcheck": {
154
+ "template": "Run the JARVIS healthcheck diagnostic and provide actionable guidance for any issues found. $ARGUMENTS",
155
+ "description": "Run JARVIS environment diagnostics"
156
+ },
157
+ "sync-azure": {
158
+ "template": "Execute the JARVIS Azure DevOps sync workflow — check connectivity, review sync status, and synchronize cards/epics/sprints. $ARGUMENTS",
159
+ "description": "Sync kanban board with Azure DevOps"
160
+ },
161
+ "start-card": {
162
+ "template": "Start working on a JARVIS kanban card. Handle the full lifecycle: check status, assign agent and sprint, move to doing, and start a context session. $ARGUMENTS",
163
+ "description": "Start working on a kanban card"
164
+ }
165
+ }
56
166
  }
57
167
  ```
58
168
 
169
+ The `"command"` block registers JARVIS slash commands (`/config`, `/healthcheck`, `/sync-azure`, `/start-card`) so OpenCode shows them in the command list. The plugin's `command.execute.before` hook enriches the prompt with detailed JARVIS-specific instructions when executed.
170
+
59
171
  OpenCode installs npm plugins automatically at startup. Requires access to the `@mc1global` org on npm.
60
172
 
61
- ### 3. First launch (automatic)
173
+ #### Where exactly does `opencode.json` go?
174
+
175
+ OpenCode supports config files at **two levels**. Choose one (or both — they merge):
176
+
177
+ **Project-level** (recommended for teams):
178
+
179
+ ```
180
+ /home/you/code/my-project/opencode.json # Linux/WSL
181
+ /Users/you/code/my-project/opencode.json # macOS
182
+ ```
183
+
184
+ This is committed to git so your whole team gets the plugin. OpenCode looks for this file in the current directory or traverses up to the nearest git root.
185
+
186
+ **Global-level** (applies to ALL your projects):
187
+
188
+ ```
189
+ ~/.config/opencode/opencode.json # Linux/macOS/WSL
190
+ ```
191
+
192
+ Use this if you want JARVIS active on every project without adding `opencode.json` to each one.
193
+
194
+ > **Precedence:** Project config overrides global config for conflicting keys.
195
+ > Non-conflicting settings from both are merged. See the
196
+ > [OpenCode config docs](https://opencode.ai/docs/config#locations) for details.
197
+
198
+ ---
199
+
200
+ ### Step 3 — First launch (automatic)
62
201
 
63
202
  Run `opencode` in your project directory. JARVIS initializes everything:
64
203
 
204
+ ```bash
205
+ cd /path/to/your/project # must contain opencode.json (or have one globally)
206
+ opencode
65
207
  ```
66
- What JARVIS creates automatically on first load:
67
208
 
68
- .jarvis/ SQLite database + RAG indexes (local, gitignored)
69
- config/jarvis.yaml Default configuration (commit this)
70
- obsidian-vault/ Documentation skeleton (commit this)
71
- AGENTS.md Agent operational guide (commit this)
209
+ On first load, JARVIS creates these files and directories automatically:
210
+
211
+ ```
212
+ your-project/
213
+ .jarvis/ SQLite database + RAG indexes (local, gitignored)
214
+ config/jarvis.yaml Default configuration (commit this)
215
+ obsidian-vault/ Documentation skeleton (commit this)
216
+ AGENTS.md Agent operational guide (commit this)
72
217
  ```
73
218
 
74
219
  On the **first session**, the agent receives automatic guidance via system prompt injection to run initial diagnostics.
75
220
 
76
- ### 4. First session recommended steps
221
+ ### Step 4 First session recommended steps
77
222
 
78
223
  The agent should run these on first use (JARVIS prompts automatically):
79
224
 
@@ -82,7 +227,7 @@ The agent should run these on first use (JARVIS prompts automatically):
82
227
  3. **`rag-oracle-index`** tool with `directory="obsidian-vault"` — Index documentation
83
228
  4. **`kanban-board-view`** tool — See the kanban board
84
229
 
85
- ### 5. Verify your setup
230
+ ### Step 5 Verify your setup
86
231
 
87
232
  The `jarvis-healthcheck` tool shows all dependencies with **copy-paste fix commands**:
88
233
 
@@ -102,130 +247,108 @@ Summary: 6 pass, 2 warn, 0 fail (8 total)
102
247
  Status: HEALTHY
103
248
  ```
104
249
 
105
- ## What Lives Where
250
+ ---
251
+
252
+ ## File Locations Reference
106
253
 
107
- ### In Git (committed, shared with team)
254
+ ### In your project (committed to git, shared with team)
108
255
 
109
256
  ```
110
- opencode.json Plugin declaration
111
- config/jarvis.yaml Configuration (auto-created, then customized)
112
- AGENTS.md Agent operational guide (auto-generated)
113
- obsidian-vault/ Documentation vault
114
- .opencode/skills/ Workflow skills for the agent
115
- .opencode/commands/ Slash commands (/healthcheck, /sync-azure, /start-card)
257
+ your-project/
258
+ opencode.json Plugin declaration (Step 2 above)
259
+ config/jarvis.yaml Configuration (auto-created, then customized)
260
+ AGENTS.md Agent operational guide (auto-generated)
261
+ obsidian-vault/ Documentation vault
116
262
  ```
117
263
 
118
- ### Local per machine (NOT in git)
264
+ ### Local per machine (NOT committed — add to .gitignore)
119
265
 
120
266
  ```
121
- .jarvis/jarvis.db SQLite: kanban, sessions, metrics, sync mappings
122
- .jarvis/rag/ Vectra vector store (RAG embeddings)
267
+ your-project/
268
+ .jarvis/jarvis.db SQLite: kanban, sessions, metrics, sync mappings
269
+ .jarvis/rag/ Vectra vector store (RAG embeddings)
123
270
  ```
124
271
 
125
- ### Global (shared across all projects)
272
+ ### Global (shared across all your projects)
126
273
 
127
274
  ```
128
- ~/.jarvis/registry.db Workspace registry (cross-project)
129
- ~/.cache/opencode/ Plugin npm cache (managed by OpenCode)
275
+ ~/.config/opencode/opencode.json Global OpenCode config (optional)
276
+ ~/.jarvis/registry.db Workspace registry (cross-project)
277
+ ~/.cache/opencode/node_modules/ Plugin npm cache (managed by OpenCode)
130
278
  ```
131
279
 
132
- ## Available Skills and Commands
280
+ ---
133
281
 
134
- ### Skills (loaded on demand via `skill()` tool)
282
+ ## Setup Scripts
135
283
 
136
- | Skill | Description |
137
- |---|---|
138
- | `jarvis-onboarding` | Setup, healthcheck, RAG indexing, tool reference |
139
- | `jarvis-kanban` | Card lifecycle, grooming, sprints, gate tasks |
140
- | `jarvis-azure-sync` | Azure DevOps push/pull/sync, PR creation |
284
+ Automated setup scripts are available in the `scripts/setup/` directory of this repository. Each script installs all non-npm prerequisites for JARVIS (Bun, Ollama, embedding model) and optionally Azure CLI and Dagger:
141
285
 
142
- ### Commands (slash commands in any session)
286
+ - **`scripts/setup/setup-macos.sh`** macOS with Homebrew
287
+ - **`scripts/setup/setup-linux.sh`** — Ubuntu, Debian, Fedora, Arch Linux
288
+ - **`scripts/setup/setup-wsl.sh`** — Windows Subsystem for Linux (includes OpenCode CLI install + WSL detection)
143
289
 
144
- | Command | Description |
145
- |---|---|
146
- | `/healthcheck` | Run diagnostics with actionable fix guidance |
147
- | `/sync-azure` | Execute Azure DevOps sync workflow |
148
- | `/start-card CD-XXX` | Start working on a kanban card (full lifecycle) |
290
+ Each script is interactive, checks for existing installations, and clearly reports what it does.
149
291
 
150
- ## Installation (Local Development)
292
+ ---
151
293
 
152
- ```bash
153
- # Clone
154
- git clone <repo-url> jarvis-plugin
155
- cd jarvis-plugin
294
+ ## Available Commands
156
295
 
157
- # Install dependencies
158
- npm install
296
+ Commands are available in any OpenCode session:
159
297
 
160
- # Build
161
- npm run build
298
+ - **`/healthcheck`** — Run diagnostics with actionable fix guidance
299
+ - **`/sync-azure`** — Execute Azure DevOps sync workflow
300
+ - **`/start-card CD-XXX`** — Start working on a kanban card (full lifecycle)
301
+ - **`/config`** — Agent-guided configuration wizard
162
302
 
163
- # Configure in OpenCode (add to your opencode.json)
164
- {
165
- "plugin": {
166
- "jarvis": {
167
- "path": "/path/to/jarvis-plugin"
168
- }
169
- }
170
- }
171
- ```
172
-
173
- ## MCP Server Mode
174
-
175
- JARVIS also runs as a standalone MCP server (stdio transport) for Claude Desktop, Cursor, or other MCP clients:
176
-
177
- ```bash
178
- bun run src/mcp-server.ts --directory /path/to/project
179
- ```
303
+ ## Available Skills (loaded on demand via `skill()` tool)
180
304
 
181
- Configure tool filtering in `config/jarvis.yaml`:
305
+ - **`jarvis-kanban`** Card lifecycle, grooming, sprints, gate tasks
306
+ - **`jarvis-azure-sync`** — Azure DevOps push/pull/sync, PR creation
307
+ - **`jarvis-onboarding`** — Setup, healthcheck, RAG indexing, tool reference
182
308
 
183
- ```yaml
184
- mcp-server:
185
- transport: "stdio"
186
- enabledTools: null # null = all tools, or list specific tool names
187
- ```
309
+ ---
188
310
 
189
311
  ## Features
190
312
 
191
- ### 113 Tools across 14 categories
192
-
193
- | Category | Count | Key Tools |
194
- |---|---|---|
195
- | **Context Memory** | 8 | `context-session-*`, `context-todo-*`, `context-note-*`, `context-search` |
196
- | **Kanban Cards** | 12 | `kanban-card-create/move/list/get/assign/estimate/criteria/delete/brief` |
197
- | **Kanban Board** | 15 | `kanban-sprint-*`, `kanban-epic-*`, `kanban-board-*`, `kanban-wip-check` |
198
- | **Kanban Grooming** | 4 | `kanban-grooming-validate`, `kanban-card-scope-doc/criteria/estimate`, `kanban-card-gate` |
199
- | **Governance** | 2 | `governance-validate`, `governance-policies` |
200
- | **Token Metrics** | 7 | `metrics-record/history/agent-report/card-report/sprint-report/summary/estimate` |
201
- | **RAG** | 8 | `rag-search/index/snippet/update/delete/status/oracle-search/oracle-index` |
202
- | **Data** | 3 | `data-yaml-get`, `data-json-get`, `data-csv-query` |
203
- | **Vault** | 11 | `vault-doc-*`, `vault-frontmatter-*`, `vault-table-*`, `vault-manage` |
204
- | **Agent** | 8 | `agent-sessions/send/notify/dispatch`, `agent-register/profile/list/spawn` |
205
- | **Domain Map** | 2 | `domain-map-analyze`, `domain-map-view` |
206
- | **Workspace** | 4 | `workspace-info/list/update/link` |
207
- | **Environment** | 6 | `env-init/create/list/status/merge/delete` |
208
- | **Pipeline** | 10 | `pipeline-init/activate/cancel/retry/run/gate/status/list/template/scaffold` |
209
- | **Azure Sync** | 10 | `azure-sync-*`, `azure-pr-*` |
210
- | **Bootstrap** | 3 | `jarvis-bootstrap`, `jarvis-healthcheck`, `jarvis-terminal-commands` |
211
-
212
- ### 5 Hooks
213
-
214
- | Hook | Type | Description |
215
- |---|---|---|
216
- | **Context Compacting** | `experimental.session.compacting` | Injects session context when context window compacts |
217
- | **First-Run Guide** | `experimental.chat.system.transform` | Injects setup instructions on first session |
218
- | **Shell Environment** | `shell.env` | Injects JARVIS env vars into shell sessions |
219
- | **Guardrails** | `tool.execute.before` | Governance policy enforcement on tool invocations |
220
- | **Event Handlers** | `event` | Token usage tracking and cross-context event handling |
313
+ ### 115 Tools across 15 categories
314
+
315
+ - **Context Memory** (8) `context-session-*`, `context-todo-*`, `context-note-*`, `context-search`
316
+ - **Kanban Cards** (12) — `kanban-card-create/move/list/get/assign/estimate/criteria/delete/brief`
317
+ - **Kanban Board** (15) `kanban-sprint-*`, `kanban-epic-*`, `kanban-board-*`, `kanban-wip-check`
318
+ - **Kanban Grooming** (4) `kanban-grooming-validate`, `kanban-card-scope-doc/criteria/estimate`, `kanban-card-gate`
319
+ - **Governance** (2) `governance-validate`, `governance-policies`
320
+ - **Token Metrics** (7) `metrics-record/history/agent-report/card-report/sprint-report/summary/estimate`
321
+ - **RAG** (8) `rag-search/index/snippet/update/delete/status/oracle-search/oracle-index`
322
+ - **Data** (3) `data-yaml-get`, `data-json-get`, `data-csv-query`
323
+ - **Vault** (11) `vault-doc-*`, `vault-frontmatter-*`, `vault-table-*`, `vault-manage`
324
+ - **Agent** (8) `agent-sessions/send/notify/dispatch`, `agent-register/profile/list/spawn`
325
+ - **Domain Map** (2) `domain-map-analyze`, `domain-map-view`
326
+ - **Workspace** (4) `workspace-info/list/update/link`
327
+ - **Environment** (6) `env-init/create/list/status/merge/delete`
328
+ - **Pipeline** (10) `pipeline-init/activate/cancel/retry/run/gate/status/list/template/scaffold`
329
+ - **Azure Sync** (10) `azure-sync-*`, `azure-pr-*`
330
+ - **Bootstrap** (3) `jarvis-bootstrap`, `jarvis-healthcheck`, `jarvis-terminal-commands`
331
+
332
+ ### 8 Hooks
333
+
334
+ - **Context Compacting** — Injects session context when context window compacts
335
+ - **First-Run Guide** — Injects setup instructions on first session
336
+ - **Shell Environment** Injects JARVIS env vars into shell sessions
337
+ - **Guardrails** — Governance policy enforcement on tool invocations
338
+ - **Event Handlers** Token usage tracking and cross-context event handling
339
+ - **Execution Journal** Crash recovery via tool execution state tracking
340
+ - **Slash Commands** `/healthcheck`, `/sync-azure`, `/start-card`, `/config`
341
+ - **Config Command** Agent-guided configuration editing
221
342
 
222
343
  ### 13 Governance Policies
223
344
 
224
345
  Runtime-enforced via `tool.execute.before` hook. Covers: CSV/YAML/env file access, force push protection, SQLite CLI blocking, destructive shell ops, credential file protection, and more.
225
346
 
347
+ ---
348
+
226
349
  ## Configuration
227
350
 
228
- All settings live in `config/jarvis.yaml`. The `ConfigService` deep-merges YAML overrides over hardcoded defaults. Available sections:
351
+ All settings live in `config/jarvis.yaml`. The `ConfigService` deep-merges YAML overrides over hardcoded defaults:
229
352
 
230
353
  ```yaml
231
354
  # RAG embedding settings
@@ -267,32 +390,35 @@ pipeline:
267
390
 
268
391
  Never read YAML files directly — use `data-yaml-get` tool or `ConfigService` getters.
269
392
 
393
+ ---
394
+
395
+ ## MCP Server Mode
396
+
397
+ JARVIS also runs as a standalone MCP server (stdio transport) for Claude Desktop, Cursor, or other MCP clients:
398
+
399
+ ```bash
400
+ bun run src/mcp-server.ts --directory /path/to/project
401
+ ```
402
+
403
+ Configure tool filtering in `config/jarvis.yaml` under `mcp-server`.
404
+
405
+ ---
406
+
270
407
  ## Architecture
271
408
 
272
409
  ```
273
410
  jarvis-plugin/
274
411
  src/
275
- domain/ # Pure business logic, zero external deps
276
- shared/ # WorkspaceId, EntityId, Result<T>
277
- context-memory/ # Session, Todo, Note entities + services
278
- kanban/ # Card state machine, Sprint, Epic, Grooming
279
- governance/ # 13 policy rules, validation service
280
- token-metrics/ # Token usage tracking, cost-per-card/sprint, budget alerts
281
- rag/ # RAG value objects, domain services
282
- vault/ # Vault document, section, table entities
283
- domain-map/ # Bounded context detection, domain analysis
284
- workspace-registry/ # Cross-project workspace registration
285
- environment/ # Container-use environment management
286
- agent-registry/ # Agent profile management
287
- pipeline/ # CI/CD pipeline entities, gate enforcement
288
- config/ # Configuration value objects + defaults
289
- application/ # Use cases with DTOs (11 bounded contexts)
290
- infrastructure/ # SQLite repos, Vectra, Ollama, FS adapters
291
- tools/ # 20 tool modules (113 tools total)
292
- hooks/ # 5 hooks (guardrails, compacting, first-run, events, shell-env)
293
- tests/ # 2,520+ tests across 85 test suites
294
- obsidian-vault/ # Structured documentation
295
- config/ # jarvis.yaml configuration
412
+ domain/ Pure business logic, zero external deps (11 bounded contexts)
413
+ application/ Use cases with DTOs
414
+ infrastructure/ SQLite repos, Vectra, Ollama, FS adapters
415
+ tools/ 20 tool modules (115 tools total)
416
+ hooks/ 8 hooks
417
+ tests/ 2,670+ tests across 93 test suites
418
+ scripts/setup/ Per-OS automated setup scripts
419
+ obsidian-vault/ Structured documentation
420
+ config/ jarvis.yaml configuration
421
+ templates/ AGENTS.md template engine
296
422
  ```
297
423
 
298
424
  **Key constraints:**
@@ -304,6 +430,8 @@ jarvis-plugin/
304
430
  - 11 bounded contexts with strict DDD boundaries
305
431
  - Production runtime: Bun (`bun:sqlite`); Tests: Node.js + Jest
306
432
 
433
+ ---
434
+
307
435
  ## Storage
308
436
 
309
437
  All data is stored locally:
@@ -313,30 +441,48 @@ All data is stored locally:
313
441
  - `.jarvis/rag/<workspace>/index-manifest.json` — File index registry (incremental indexing)
314
442
  - `~/.jarvis/registry.db` — Central workspace registry (cross-project)
315
443
 
316
- The `JARVIS_HOME` environment variable overrides `~/.jarvis/` default.
444
+ The `JARVIS_HOME` environment variable overrides the `~/.jarvis/` default.
445
+
446
+ ---
317
447
 
318
- ## Development
448
+ ## Local Development
319
449
 
320
450
  ```bash
451
+ # Clone
452
+ git clone <repo-url> jarvis-plugin
453
+ cd jarvis-plugin
454
+
455
+ # Install dependencies
456
+ npm install
457
+
458
+ # Build
459
+ npm run build
460
+
321
461
  # Run all tests
322
462
  npm test
323
463
 
324
464
  # Type check (zero errors required)
325
465
  npm run lint
326
466
 
327
- # Build
328
- npm run build
329
-
330
467
  # Single test file
331
468
  node --experimental-vm-modules node_modules/.bin/jest src/tests/application/healthcheck.test.ts --no-coverage
332
469
 
333
470
  # Watch mode
334
471
  npm run dev
335
472
 
336
- # RAG index (standalone, bypasses MCP timeouts)
337
- npx tsx scripts/rag-index.ts --clear
473
+ # Configure for local plugin development in OpenCode:
474
+ # Add to your project's opencode.json:
475
+ {
476
+ "plugin": {
477
+ "jarvis": {
478
+ "path": "/absolute/path/to/jarvis-plugin"
479
+ }
480
+ }
481
+ }
338
482
  ```
339
483
 
484
+ ---
485
+
340
486
  ## Troubleshooting
341
487
 
342
488
  **Ollama connection refused**
@@ -352,10 +498,17 @@ npx tsx scripts/rag-index.ts --clear
352
498
  - Try full reindex: use `rag-index` tool with `clear: true`
353
499
 
354
500
  **Plugin not loading in OpenCode**
355
- - Verify `opencode.json` has `"plugin": ["@mc1global/opencode-jarvis"]`
501
+ - Verify `opencode.json` exists in your project root (or globally at `~/.config/opencode/opencode.json`)
502
+ - Verify it contains `"plugin": ["@mc1global/opencode-jarvis"]`
356
503
  - Check `~/.cache/opencode/node_modules/` for the installed package
357
504
  - Ensure Bun is installed (required for production runtime)
358
505
 
506
+ **Windows: Plugin not loading**
507
+ - JARVIS must run inside WSL, not native Windows PowerShell/cmd
508
+ - Install prerequisites inside WSL using `setup-wsl.sh`
509
+ - Run `opencode` from your WSL terminal
510
+ - See [OpenCode WSL docs](https://opencode.ai/docs/windows-wsl)
511
+
359
512
  **MCP server fails to start**
360
513
  - Ensure Bun is installed: `bun --version`
361
514
  - Run manually: `bun run src/mcp-server.ts --directory .`
@@ -365,30 +518,20 @@ npx tsx scripts/rag-index.ts --clear
365
518
  - Ensure Azure CLI is authenticated: `az login`
366
519
  - Test connectivity: use `azure-sync-config` tool
367
520
 
368
- **tsc errors in development**
369
- - Remember: `exactOptionalPropertyTypes` requires conditional spreading for optional props
370
- - Use `import type` for type-only imports (`verbatimModuleSyntax`)
371
- - Array indexing returns `T | undefined` (`noUncheckedIndexedAccess`)
521
+ ---
372
522
 
373
523
  ## Dependencies
374
524
 
375
- | Dependency | Purpose |
376
- |---|---|
377
- | `bun:sqlite` | Local SQLite database (production) |
378
- | `better-sqlite3` | SQLite for tests (Node.js) |
379
- | `js-yaml` | YAML file parsing |
380
- | `vectra` | Local vector store for RAG |
381
- | `ollama` | Embedding generation via local Ollama |
382
- | `@langchain/textsplitters` | Code-aware text chunking for RAG |
383
- | `@opencode-ai/plugin` | OpenCode plugin SDK (peer dependency) |
384
- | `@modelcontextprotocol/sdk` | MCP server protocol (optional) |
385
-
386
- ## Test Coverage
387
-
388
- - **2,520+ tests** across 85 test suites
389
- - Domain, application, infrastructure, and tools layers tested
390
- - In-memory SQLite for fast, isolated integration tests
391
- - `tsc --noEmit` zero errors with all strict flags
525
+ - `bun:sqlite` Local SQLite database (production)
526
+ - `better-sqlite3` — SQLite for tests (Node.js)
527
+ - `js-yaml` YAML file parsing
528
+ - `vectra` Local vector store for RAG
529
+ - `ollama` Embedding generation via local Ollama
530
+ - `@langchain/textsplitters` Code-aware text chunking for RAG
531
+ - `@opencode-ai/plugin` OpenCode plugin SDK (peer dependency)
532
+ - `@modelcontextprotocol/sdk` MCP server protocol (optional)
533
+
534
+ ---
392
535
 
393
536
  ## License
394
537
 
@@ -1 +1 @@
1
- {"version":3,"file":"use-cases.d.ts","sourceRoot":"","sources":["../../../src/application/bootstrap/use-cases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAI5E,6DAA6D;AAC7D,MAAM,WAAW,eAAe;IAC9B,4DAA4D;IAC5D,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,iDAAiD;IACjD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,sDAAsD;IACtD,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,wDAAwD;IACxD,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;CACvC;AAED,qCAAqC;AACrC,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACjC;AA8DD;;GAEG;AACH,qBA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