lockstep-mcp 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tim Moore
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,669 @@
1
+ # Lockstep MCP
2
+
3
+ [![CI](https://github.com/Tmmoore286/lockstep-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/Tmmoore286/lockstep-mcp/actions/workflows/ci.yml)
4
+
5
+ Lockstep MCP is a multi-agent coordination server that enables Claude, Codex, and other AI agents to work together on the same project without conflicts. It provides shared state (tasks, locks, notes) so agents can coordinate their work.
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ # Install (one-time)
11
+ git clone https://github.com/Tmmoore286/lockstep-mcp.git ~/lockstep-mcp
12
+ cd ~/lockstep-mcp && npm install && npm run build && npm link
13
+ lockstep-mcp install --all
14
+
15
+ # Enable in your project
16
+ cd /path/to/your/project
17
+ lockstep-mcp init
18
+
19
+ # Start the dashboard (optional)
20
+ lockstep-mcp dashboard
21
+ ```
22
+
23
+ Then tell Claude "you're the planner" and Codex "you're the implementer".
24
+
25
+ ## Features
26
+
27
+ - **Task Management** - Create, assign, and track tasks with complexity levels and review workflow
28
+ - **File Locking** - Prevent conflicts when multiple agents edit the same files
29
+ - **Git Worktree Isolation** - Optional isolated branches for complex/parallel work
30
+ - **Real-time Dashboard** - Monitor all agents, tasks, and locks in a web UI
31
+ - **Discussion System** - Agents can discuss architectural decisions
32
+ - **Multi-platform Launchers** - tmux and macOS Terminal launchers
33
+
34
+ ## For AI Agents: Installation Instructions
35
+
36
+ If you are an AI agent (Claude, Codex, or similar) and have been asked to install lockstep-mcp, follow these steps exactly:
37
+
38
+ ### Step 1: Clone and Build
39
+
40
+ ```bash
41
+ cd ~
42
+ git clone https://github.com/Tmmoore286/lockstep-mcp.git
43
+ cd lockstep-mcp
44
+ npm install
45
+ npm run build
46
+ ```
47
+
48
+ ### Step 2: Install Globally (Optional but Recommended)
49
+
50
+ ```bash
51
+ npm link
52
+ ```
53
+
54
+ This makes the `lockstep-mcp` command available system-wide.
55
+
56
+ ### Step 3: Add to Your MCP Configuration
57
+
58
+ Run the install command to automatically configure lockstep-mcp:
59
+
60
+ ```bash
61
+ lockstep-mcp install --all
62
+ ```
63
+
64
+ This adds lockstep-mcp to both Claude Code (`~/.mcp.json` or project `.mcp.json`) and Codex (`~/.codex/config.toml`).
65
+
66
+ **Alternative: Install for specific tools only:**
67
+ ```bash
68
+ lockstep-mcp install --claude # Claude Code only
69
+ lockstep-mcp install --codex # Codex only
70
+ ```
71
+
72
+ ### Step 4: Enable in the Project
73
+
74
+ Navigate to the project where you want to use coordination:
75
+
76
+ ```bash
77
+ cd /path/to/your/project
78
+ lockstep-mcp init
79
+ ```
80
+
81
+ This adds coordination instructions to `CLAUDE.md` (creates the file if it doesn't exist). The instructions tell agents how to use lockstep-mcp.
82
+
83
+ ### Step 5: Verify Installation
84
+
85
+ ```bash
86
+ lockstep-mcp status
87
+ ```
88
+
89
+ You should see output like:
90
+ ```
91
+ Lockstep MCP Status
92
+ ──────────────────────────────────────────────────
93
+
94
+ Global Installation:
95
+ Claude: ✓ Installed
96
+ Codex: ✓ Installed
97
+
98
+ Current Project (/path/to/your/project):
99
+ Coordination: ✓ Enabled
100
+ ```
101
+
102
+ ### Step 6: Restart Your AI Tools
103
+
104
+ After installation, restart Claude Code and/or Codex so they pick up the new MCP server configuration.
105
+
106
+ ---
107
+
108
+ ## For AI Agents: How to Use Lockstep
109
+
110
+ Once installed, here's how coordination works:
111
+
112
+ ### Starting a Coordination Session
113
+
114
+ When you start working in a project with lockstep enabled, call the `coordination_init` tool with your role:
115
+
116
+ ```
117
+ coordination_init({ role: "planner" }) // If you're planning/creating tasks
118
+ coordination_init({ role: "implementer" }) // If you're implementing tasks
119
+ ```
120
+
121
+ ### If You're the Planner
122
+
123
+ The planner goes through these phases automatically:
124
+
125
+ **Phase 1 - Gather Information:**
126
+ 1. Call `coordination_init({ role: "planner" })`
127
+ 2. If no project context exists, ask the user:
128
+ - What is this project?
129
+ - What is the desired end state/goal?
130
+ - What technologies are being used?
131
+ - Any constraints or requirements?
132
+ - What are the acceptance criteria?
133
+ - What tests should pass when complete?
134
+ 3. Call `project_context_set` with all the details
135
+
136
+ **Phase 2 - Create Implementation Plan:**
137
+ 1. Based on the project context, create a detailed implementation plan
138
+ 2. Call `project_context_set` again with the `implementationPlan` array
139
+ 3. Set status to "ready"
140
+
141
+ **Phase 3 - Create Tasks:**
142
+ 1. Create specific, actionable tasks using `task_create`
143
+ 2. Ask the user what type of implementer they prefer (Claude or Codex)
144
+ 3. Use `launch_implementer` to spawn workers (1-2 for simple projects, more for complex ones)
145
+
146
+ **Phase 4 - Monitor:**
147
+ 1. Periodically check `task_list` and `note_list`
148
+ 2. Respond to implementer questions via `note_append`
149
+ 3. Add more implementers with `launch_implementer` if needed
150
+ 4. When all tasks are done, call `project_status_set` with status "complete"
151
+ 5. To stop all work, call `project_status_set` with status "stopped"
152
+
153
+ ### If You're the Implementer
154
+
155
+ Implementers run in a **continuous loop** until the project is stopped or complete:
156
+
157
+ ```
158
+ CONTINUOUS WORK LOOP:
159
+ 1. Call task_list to see available tasks (also returns projectStatus)
160
+ 2. If projectStatus is "stopped" or "complete" -> STOP working
161
+ 3. If tasks available, call task_claim to take a "todo" task
162
+ 4. Call lock_acquire before editing any file
163
+ 5. Do the work
164
+ 6. Call lock_release when done with file
165
+ 7. Call task_update to mark task "done"
166
+ 8. REPEAT from step 1
167
+ ```
168
+
169
+ **IMPORTANT:** Keep working until all tasks are done or project is stopped. Do NOT wait for user input between tasks.
170
+
171
+ ### Project Status States
172
+
173
+ | Status | Meaning |
174
+ |--------|---------|
175
+ | `planning` | Planner is gathering information and creating plan |
176
+ | `ready` | Plan is ready, tasks can be created |
177
+ | `in_progress` | Implementers are actively working |
178
+ | `complete` | All work is done |
179
+ | `stopped` | Planner has halted all work |
180
+
181
+ ### Disabling Lockstep
182
+
183
+ If the user says "don't use lockstep" or "work independently", stop using lockstep tools and work normally.
184
+
185
+ ---
186
+
187
+ ## For Humans: Quick Start
188
+
189
+ ### 1. Install
190
+
191
+ ```bash
192
+ git clone https://github.com/Tmmoore286/lockstep-mcp.git
193
+ cd lockstep-mcp
194
+ npm install
195
+ npm run build
196
+ npm link
197
+ ```
198
+
199
+ ### 2. Configure
200
+
201
+ ```bash
202
+ lockstep-mcp install --all
203
+ ```
204
+
205
+ ### 3. Enable in Your Project
206
+
207
+ ```bash
208
+ cd /path/to/your/project
209
+ lockstep-mcp init
210
+ ```
211
+
212
+ ### 4. Start Coordinating
213
+
214
+ Open Claude and Codex in your project. Tell one "you're the planner" and the other "you're the implementer". They'll coordinate automatically.
215
+
216
+ ---
217
+
218
+ ## CLI Commands Reference
219
+
220
+ | Command | Description |
221
+ |---------|-------------|
222
+ | `lockstep-mcp install --all` | Add to both Claude and Codex configs |
223
+ | `lockstep-mcp install --claude` | Add to Claude config only |
224
+ | `lockstep-mcp install --codex` | Add to Codex config only |
225
+ | `lockstep-mcp uninstall` | Remove from all configs |
226
+ | `lockstep-mcp init` | Enable coordination in current project |
227
+ | `lockstep-mcp disable` | Disable coordination in current project |
228
+ | `lockstep-mcp enable` | Re-enable coordination in current project |
229
+ | `lockstep-mcp status` | Show installation and project status |
230
+ | `lockstep-mcp dashboard` | Start the web dashboard |
231
+ | `lockstep-mcp tmux --repo /path` | Launch Claude + Codex in tmux |
232
+ | `lockstep-mcp macos --repo /path` | Launch in macOS Terminal windows |
233
+ | `lockstep-mcp server` | Start the MCP server (called by AI tools) |
234
+ | `lockstep-mcp help` | Show help |
235
+
236
+ ---
237
+
238
+ ## MCP Tools Reference
239
+
240
+ ### Coordination Tools
241
+
242
+ | Tool | Description | Required Parameters |
243
+ |------|-------------|---------------------|
244
+ | `coordination_init` | Initialize coordination session. Returns phase-specific guidance. | `role`: "planner" or "implementer" |
245
+ | `project_context_set` | Store project context including plan and acceptance criteria | `description`, `endState` |
246
+ | `project_context_get` | Retrieve stored project context | (none) |
247
+ | `project_status_set` | Set project status (stopped, complete, etc.) | `status` |
248
+ | `launch_implementer` | Launch a new implementer agent in a terminal window | `type` ("claude" or "codex"), `name` |
249
+ | `implementer_list` | List all registered implementers | (none) |
250
+
251
+ ### Task Tools
252
+
253
+ | Tool | Description | Required Parameters |
254
+ |------|-------------|---------------------|
255
+ | `task_create` | Create a new task | `title` |
256
+ | `task_claim` | Claim a task (sets status to in_progress) | `id`, `owner` |
257
+ | `task_update` | Update a task | `id` |
258
+ | `task_list` | List tasks with optional filters. Also returns `projectStatus`. | (none) |
259
+ | `task_submit_for_review` | Submit completed task for planner review | `id`, `owner`, `reviewNotes` |
260
+ | `task_approve` | Planner approves a task | `id` |
261
+ | `task_request_changes` | Planner requests changes on a task | `id`, `feedback` |
262
+
263
+ **Task Complexity Levels:**
264
+ - `simple` - 1-2 files, obvious fix, no architectural decisions
265
+ - `medium` - 3-5 files, some ambiguity, needs verification
266
+ - `complex` - 6+ files, architectural decisions, cross-system impact
267
+ - `critical` - Database schema, security, affects other products (requires planner approval)
268
+
269
+ **Task Isolation Modes:**
270
+ - `shared` (default) - Implementer works in main directory with file locks
271
+ - `worktree` - Implementer gets isolated git worktree with own branch (good for complex/parallel work)
272
+
273
+ ### Lock Tools
274
+
275
+ | Tool | Description | Required Parameters |
276
+ |------|-------------|---------------------|
277
+ | `lock_acquire` | Lock a file before editing | `path` |
278
+ | `lock_release` | Release a lock | `path` |
279
+ | `lock_list` | List active locks | (none) |
280
+
281
+ ### Note Tools
282
+
283
+ | Tool | Description | Required Parameters |
284
+ |------|-------------|---------------------|
285
+ | `note_append` | Add a note (for inter-agent communication) | `text` |
286
+ | `note_list` | List recent notes | (none) |
287
+
288
+ ### File Tools
289
+
290
+ | Tool | Description | Required Parameters |
291
+ |------|-------------|---------------------|
292
+ | `file_read` | Read a file | `path` |
293
+ | `file_write` | Write to a file | `path`, `content` |
294
+ | `artifact_read` | Read an artifact | `path` |
295
+ | `artifact_write` | Write an artifact | `path`, `content` |
296
+
297
+ ### Discussion Tools
298
+
299
+ | Tool | Description | Required Parameters |
300
+ |------|-------------|---------------------|
301
+ | `discussion_start` | Start a discussion with another agent | `topic`, `message`, `author`, `waitingOn` |
302
+ | `discussion_reply` | Reply to a discussion | `id`, `message`, `author` |
303
+ | `discussion_resolve` | Mark a discussion as resolved | `id` |
304
+ | `discussion_inbox` | Get discussions waiting on an agent | `agent` |
305
+
306
+ ### Worktree Tools
307
+
308
+ | Tool | Description | Required Parameters |
309
+ |------|-------------|---------------------|
310
+ | `worktree_status` | Get status of an implementer's worktree | `implementer` |
311
+ | `worktree_merge` | Merge worktree changes back to main | `implementer` |
312
+ | `worktree_list` | List all active worktrees | (none) |
313
+ | `worktree_cleanup` | Clean up orphaned worktrees | (none) |
314
+
315
+ ### Other Tools
316
+
317
+ | Tool | Description | Required Parameters |
318
+ |------|-------------|---------------------|
319
+ | `status_get` | Get coordinator status and config | (none) |
320
+ | `command_run` | Execute a shell command | `command` |
321
+ | `tool_install` | Install a tool via package manager | `manager` |
322
+ | `log_append` | Append to event log | `event` |
323
+
324
+ ---
325
+
326
+ ## How Coordination Works
327
+
328
+ ### Shared Database
329
+
330
+ All agents connect to the same SQLite database at `~/.lockstep-mcp/data/coordinator.db`. This is how they share state:
331
+
332
+ ```
333
+ ┌─────────────────────────────────────────────────────┐
334
+ │ lockstep-mcp │
335
+ │ (shared SQLite database) │
336
+ │ │
337
+ │ • Tasks (todo, in_progress, done) │
338
+ │ • Locks (which files are being edited) │
339
+ │ • Notes (inter-agent messages) │
340
+ │ • Project Context (description, goals) │
341
+ └─────────────────────────────────────────────────────┘
342
+ ▲ ▲
343
+ │ │
344
+ ┌────┴────┐ ┌────┴────┐
345
+ │ Claude │ │ Codex │
346
+ │(planner)│ │(implmtr)│
347
+ └─────────┘ └─────────┘
348
+ ```
349
+
350
+ ### Role Assignment
351
+
352
+ Roles are NOT configured in advance. When an agent starts, the user tells it which role to play:
353
+ - "You're the planner" → Agent calls `coordination_init({ role: "planner" })`
354
+ - "You're the implementer" → Agent calls `coordination_init({ role: "implementer" })`
355
+
356
+ This means you can use any combination:
357
+ - Claude as planner + Codex as implementer
358
+ - Codex as planner + Claude as implementer
359
+ - Two Codex instances (one planner, one implementer)
360
+ - Multiple implementers
361
+
362
+ ### Preventing Conflicts
363
+
364
+ Agents use locks to prevent editing the same file simultaneously:
365
+
366
+ 1. Before editing `src/app.ts`:
367
+ ```
368
+ lock_acquire({ path: "src/app.ts", owner: "codex" })
369
+ ```
370
+
371
+ 2. Edit the file
372
+
373
+ 3. After editing:
374
+ ```
375
+ lock_release({ path: "src/app.ts" })
376
+ ```
377
+
378
+ If another agent tries to acquire a lock on a file that's already locked, they'll get an error and should wait.
379
+
380
+ ### Git Worktree Isolation
381
+
382
+ For complex or parallel work, agents can use isolated git worktrees instead of file locks:
383
+
384
+ ```
385
+ # Planner creates a task with worktree isolation
386
+ task_create({
387
+ title: "Major refactor",
388
+ complexity: "complex",
389
+ isolation: "worktree"
390
+ })
391
+
392
+ # Launch implementer with worktree isolation
393
+ launch_implementer({
394
+ name: "impl-1",
395
+ type: "claude",
396
+ isolation: "worktree"
397
+ })
398
+ ```
399
+
400
+ When using worktrees:
401
+ - Each implementer gets their own branch (e.g., `lockstep/impl-1`)
402
+ - No file locks needed - full isolation
403
+ - Implementers commit changes frequently
404
+ - Planner uses `worktree_status` to check progress
405
+ - Planner uses `worktree_merge` to merge approved changes
406
+
407
+ Best practices:
408
+ - **Shared isolation** (default): Simple/medium tasks, quick edits
409
+ - **Worktree isolation**: Complex refactoring, parallel features, tasks that touch many files
410
+
411
+ ---
412
+
413
+ ## Disabling Lockstep
414
+
415
+ Multiple ways to turn off lockstep:
416
+
417
+ | Method | Scope | How |
418
+ |--------|-------|-----|
419
+ | Natural language | This conversation | Tell agent "don't use lockstep" |
420
+ | MCP command | This session | `/mcp disable lockstep` |
421
+ | CLI command | This project | `lockstep-mcp disable` |
422
+ | CLI command | Global | `lockstep-mcp uninstall` |
423
+
424
+ ---
425
+
426
+ ## Security Model
427
+
428
+ Lockstep MCP is designed as a **local development tool** running on your machine. The threat model is "prevent agents from escaping their sandbox," not "defend against external attackers."
429
+
430
+ ### File Access Control
431
+
432
+ | Mode | Behavior |
433
+ |------|----------|
434
+ | `open` (default) | Agents can read/write any file the process can access |
435
+ | `strict` | File operations restricted to specified `--roots` directories |
436
+
437
+ ```bash
438
+ # Restrict to specific directories
439
+ lockstep-mcp install --all --mode strict --roots /path/to/project,/tmp
440
+ ```
441
+
442
+ In strict mode, any file operation outside the allowed roots will fail.
443
+
444
+ ### Command Execution Control
445
+
446
+ The `command_run` tool executes shell commands. Control it with:
447
+
448
+ | Mode | Behavior |
449
+ |------|----------|
450
+ | `open` (default) | Any command can be executed |
451
+ | `allowlist` | Only commands in `--command-allow` list are permitted |
452
+
453
+ ```bash
454
+ # Only allow specific commands
455
+ lockstep-mcp install --all --command-mode allowlist --command-allow "npm,node,git,make"
456
+ ```
457
+
458
+ The allowlist checks the **first word** of the command (e.g., `npm install` checks `npm`).
459
+
460
+ ### Recommended Security Settings
461
+
462
+ For production-like security:
463
+ ```bash
464
+ lockstep-mcp install --all \
465
+ --mode strict \
466
+ --roots /path/to/project \
467
+ --command-mode allowlist \
468
+ --command-allow "npm,node,git,make,pytest"
469
+ ```
470
+
471
+ For typical development (default):
472
+ ```bash
473
+ lockstep-mcp install --all # Uses open mode, all commands allowed
474
+ ```
475
+
476
+ ### What Lockstep Does NOT Protect Against
477
+
478
+ - **Malicious prompts**: If you tell an agent to delete files, it will try
479
+ - **Network exfiltration**: Agents can make network requests if the underlying tools allow
480
+ - **Privilege escalation**: Lockstep runs with your user permissions
481
+
482
+ ---
483
+
484
+ ## Configuration Options
485
+
486
+ When installing, you can customize the server:
487
+
488
+ ```bash
489
+ lockstep-mcp install --all --mode strict --roots /path/to/project,/tmp
490
+ ```
491
+
492
+ | Option | Description | Default |
493
+ |--------|-------------|---------|
494
+ | `--mode open\|strict` | In strict mode, file access is limited to roots | `open` |
495
+ | `--roots /path1,/path2` | Allowed directories (for strict mode) | Current directory |
496
+ | `--storage sqlite\|json` | Storage backend | `sqlite` |
497
+ | `--db-path /path/to/db` | Database file location | `~/.lockstep-mcp/data/coordinator.db` |
498
+ | `--command-mode open\|allowlist` | Command execution policy | `open` |
499
+ | `--command-allow cmd1,cmd2` | Allowed commands (for allowlist mode) | (none) |
500
+
501
+ ---
502
+
503
+ ## Dashboard
504
+
505
+ View coordination state in real-time:
506
+
507
+ ```bash
508
+ lockstep-mcp dashboard
509
+ ```
510
+
511
+ Then open http://127.0.0.1:8787 in a browser.
512
+
513
+ The dashboard shows:
514
+ - **Project status** - Dynamic status (in progress, paused, complete)
515
+ - **All tasks** - With status, complexity, isolation mode, and owner
516
+ - **Implementers** - With current task, review queue, and completion stats
517
+ - **Active file locks** - Who has what locked
518
+ - **Recent notes** - Inter-agent communication
519
+
520
+ **Interactive features:**
521
+ - Click on active implementer cards to focus their Terminal window (macOS)
522
+ - Real-time updates via WebSocket
523
+ - Auto-detects dead implementer processes
524
+
525
+ ---
526
+
527
+ ## tmux Launcher
528
+
529
+ Launch Claude and Codex in tmux windows with one command:
530
+
531
+ ```bash
532
+ lockstep-mcp tmux --repo /path/to/your/project
533
+ ```
534
+
535
+ This creates:
536
+ - Window 1: Claude
537
+ - Window 2: Codex
538
+ - Window 3: Dashboard
539
+
540
+ Switch windows with `Ctrl-b n` (next) or `Ctrl-b p` (previous).
541
+
542
+ Options:
543
+ - `--session <name>` - tmux session name (default: `lockstep`)
544
+ - `--layout windows|panes` - separate windows or split panes
545
+ - `--no-dashboard` - skip launching dashboard
546
+ - `--no-prompts` - don't auto-inject coordination prompts
547
+
548
+ ---
549
+
550
+ ## macOS Terminal Launcher
551
+
552
+ Launch in separate macOS Terminal windows:
553
+
554
+ ```bash
555
+ lockstep-mcp macos --repo /path/to/your/project
556
+ ```
557
+
558
+ Opens three Terminal windows for Claude, Codex, and Dashboard.
559
+
560
+ ---
561
+
562
+ ## Troubleshooting
563
+
564
+ ### "lockstep-mcp: command not found"
565
+
566
+ Run `npm link` in the lockstep-mcp directory, or use the full path:
567
+ ```bash
568
+ node /path/to/lockstep-mcp/dist/cli.js status
569
+ ```
570
+
571
+ ### SQLite installation fails (node-gyp errors)
572
+
573
+ Lockstep uses SQLite for coordination state. Prebuilt binaries are available for most platforms (macOS, Windows, Linux on x64/arm64), but if you see compilation errors:
574
+
575
+ **Option 1: Install build tools**
576
+ ```bash
577
+ # macOS
578
+ xcode-select --install
579
+
580
+ # Ubuntu/Debian
581
+ sudo apt-get install build-essential python3
582
+
583
+ # Windows (run as admin)
584
+ npm install -g windows-build-tools
585
+ ```
586
+
587
+ **Option 2: Use JSON storage instead**
588
+ ```bash
589
+ lockstep-mcp install --all --storage json
590
+ ```
591
+ JSON storage works without native dependencies but is slightly slower for large projects.
592
+
593
+ ### Agent doesn't see lockstep tools
594
+
595
+ 1. Check installation: `lockstep-mcp status`
596
+ 2. Restart the AI tool (Claude/Codex)
597
+ 3. In the AI tool, run `/mcp` to see connected servers
598
+
599
+ ### Agents not coordinating
600
+
601
+ 1. Make sure both are in the same project directory
602
+ 2. Check that `lockstep-mcp init` was run in that project
603
+ 3. Verify both agents can call `coordination_init`
604
+
605
+ ### Lock conflicts
606
+
607
+ If an agent crashes while holding a lock:
608
+ ```bash
609
+ # View locks
610
+ lockstep-mcp dashboard
611
+
612
+ # Or manually clear via the database
613
+ sqlite3 ~/.lockstep-mcp/data/coordinator.db "UPDATE locks SET status='resolved' WHERE status='active'"
614
+ ```
615
+
616
+ ---
617
+
618
+ ## Example Workflow
619
+
620
+ ### 1. Setup (one time)
621
+
622
+ ```bash
623
+ # Install lockstep-mcp
624
+ cd ~/lockstep-mcp
625
+ npm install && npm run build && npm link
626
+
627
+ # Add to AI tools
628
+ lockstep-mcp install --all
629
+ ```
630
+
631
+ ### 2. Start a Project
632
+
633
+ ```bash
634
+ # Enable in your project
635
+ cd ~/my-project
636
+ lockstep-mcp init
637
+
638
+ # Start dashboard (optional)
639
+ lockstep-mcp dashboard &
640
+ ```
641
+
642
+ ### 3. Open AI Tools
643
+
644
+ **Terminal 1 (Claude):**
645
+ ```bash
646
+ cd ~/my-project
647
+ claude
648
+ ```
649
+ Then tell Claude: "You're the planner. We're building [describe project]."
650
+
651
+ **Terminal 2 (Codex):**
652
+ ```bash
653
+ cd ~/my-project
654
+ codex
655
+ ```
656
+ Then tell Codex: "You're the implementer. Check lockstep for tasks."
657
+
658
+ ### 4. Watch Them Collaborate
659
+
660
+ - Claude creates tasks based on the project description
661
+ - Codex claims tasks, implements them, marks them done
662
+ - Both use locks to avoid file conflicts
663
+ - Both use notes to communicate
664
+
665
+ ---
666
+
667
+ ## License
668
+
669
+ MIT. See `LICENSE`.