specweave 1.0.184 → 1.0.185

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/CLAUDE.md +24 -24
  2. package/bin/specweave.js +25 -0
  3. package/dist/src/cli/commands/doctor.d.ts +23 -0
  4. package/dist/src/cli/commands/doctor.d.ts.map +1 -0
  5. package/dist/src/cli/commands/doctor.js +75 -0
  6. package/dist/src/cli/commands/doctor.js.map +1 -0
  7. package/dist/src/cli/helpers/init/claude-settings-lsp.d.ts +22 -10
  8. package/dist/src/cli/helpers/init/claude-settings-lsp.d.ts.map +1 -1
  9. package/dist/src/cli/helpers/init/claude-settings-lsp.js +82 -28
  10. package/dist/src/cli/helpers/init/claude-settings-lsp.js.map +1 -1
  11. package/dist/src/core/doctor/checkers/configuration-checker.d.ts +14 -0
  12. package/dist/src/core/doctor/checkers/configuration-checker.d.ts.map +1 -0
  13. package/dist/src/core/doctor/checkers/configuration-checker.js +196 -0
  14. package/dist/src/core/doctor/checkers/configuration-checker.js.map +1 -0
  15. package/dist/src/core/doctor/checkers/environment-checker.d.ts +11 -0
  16. package/dist/src/core/doctor/checkers/environment-checker.d.ts.map +1 -0
  17. package/dist/src/core/doctor/checkers/environment-checker.js +111 -0
  18. package/dist/src/core/doctor/checkers/environment-checker.js.map +1 -0
  19. package/dist/src/core/doctor/checkers/git-checker.d.ts +13 -0
  20. package/dist/src/core/doctor/checkers/git-checker.d.ts.map +1 -0
  21. package/dist/src/core/doctor/checkers/git-checker.js +176 -0
  22. package/dist/src/core/doctor/checkers/git-checker.js.map +1 -0
  23. package/dist/src/core/doctor/checkers/hooks-checker.d.ts +13 -0
  24. package/dist/src/core/doctor/checkers/hooks-checker.d.ts.map +1 -0
  25. package/dist/src/core/doctor/checkers/hooks-checker.js +167 -0
  26. package/dist/src/core/doctor/checkers/hooks-checker.js.map +1 -0
  27. package/dist/src/core/doctor/checkers/increments-checker.d.ts +14 -0
  28. package/dist/src/core/doctor/checkers/increments-checker.d.ts.map +1 -0
  29. package/dist/src/core/doctor/checkers/increments-checker.js +195 -0
  30. package/dist/src/core/doctor/checkers/increments-checker.js.map +1 -0
  31. package/dist/src/core/doctor/checkers/plugins-checker.d.ts +13 -0
  32. package/dist/src/core/doctor/checkers/plugins-checker.d.ts.map +1 -0
  33. package/dist/src/core/doctor/checkers/plugins-checker.js +157 -0
  34. package/dist/src/core/doctor/checkers/plugins-checker.js.map +1 -0
  35. package/dist/src/core/doctor/checkers/project-structure-checker.d.ts +11 -0
  36. package/dist/src/core/doctor/checkers/project-structure-checker.d.ts.map +1 -0
  37. package/dist/src/core/doctor/checkers/project-structure-checker.js +118 -0
  38. package/dist/src/core/doctor/checkers/project-structure-checker.js.map +1 -0
  39. package/dist/src/core/doctor/doctor.d.ts +13 -0
  40. package/dist/src/core/doctor/doctor.d.ts.map +1 -0
  41. package/dist/src/core/doctor/doctor.js +162 -0
  42. package/dist/src/core/doctor/doctor.js.map +1 -0
  43. package/dist/src/core/doctor/index.d.ts +13 -0
  44. package/dist/src/core/doctor/index.d.ts.map +1 -0
  45. package/dist/src/core/doctor/index.js +13 -0
  46. package/dist/src/core/doctor/index.js.map +1 -0
  47. package/dist/src/core/doctor/types.d.ts +46 -0
  48. package/dist/src/core/doctor/types.d.ts.map +1 -0
  49. package/dist/src/core/doctor/types.js +16 -0
  50. package/dist/src/core/doctor/types.js.map +1 -0
  51. package/package.json +1 -1
  52. package/src/templates/lsp-plugin/.lsp.json +43 -0
  53. package/src/templates/lsp-plugin/plugin.json +10 -0
package/CLAUDE.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- SW:META template="claude" version="1.0.183" sections="header,start,autodetect,metarule,rules,workflow,reflect,context,structure,taskformat,secrets,syncing,testing,tdd,api,limits,troubleshooting,lazyloading,principles,linking,mcp,auto,docs" -->
1
+ <!-- SW:META template="claude" version="1.0.184" sections="header,start,autodetect,metarule,rules,workflow,reflect,context,structure,taskformat,secrets,syncing,testing,tdd,api,limits,troubleshooting,lazyloading,principles,linking,mcp,auto,docs" -->
2
2
 
3
3
  <!-- SW:SECTION:hook-priority version="1.0.171" -->
4
4
  ## ⛔ ABSOLUTE PRIORITY: Hook Instructions Are Mandatory
@@ -53,7 +53,7 @@ Hooks exist to enforce workflow discipline. If you ignore them:
53
53
  **This is non-negotiable. No exceptions. No "just this once".**
54
54
  <!-- SW:END:hook-priority -->
55
55
 
56
- <!-- SW:SECTION:header version="1.0.183" -->
56
+ <!-- SW:SECTION:header version="1.0.184" -->
57
57
  **Framework**: SpecWeave | **Truth**: `spec.md` + `tasks.md`
58
58
  <!-- SW:END:header -->
59
59
 
@@ -244,7 +244,7 @@ The official `typescript-lsp@claude-plugins-official` and similar plugins:
244
244
 
245
245
  Use `boostvolt/claude-code-lsps` until official plugins are fixed.
246
246
 
247
- <!-- SW:SECTION:start version="1.0.183" -->
247
+ <!-- SW:SECTION:start version="1.0.184" -->
248
248
  ## Getting Started
249
249
 
250
250
  **Initial increment**: `0001-project-setup` (auto-created by `specweave init`)
@@ -254,7 +254,7 @@ Use `boostvolt/claude-code-lsps` until official plugins are fixed.
254
254
  2. **Customize**: Edit spec.md and use for setup tasks
255
255
  <!-- SW:END:start -->
256
256
 
257
- <!-- SW:SECTION:autodetect version="1.0.183" -->
257
+ <!-- SW:SECTION:autodetect version="1.0.184" -->
258
258
  ## Auto-Detection
259
259
 
260
260
  SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
@@ -264,7 +264,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
264
264
  **Opt-out phrases**: "Just brainstorm first" | "Don't plan yet" | "Quick discussion" | "Let's explore ideas"
265
265
  <!-- SW:END:autodetect -->
266
266
 
267
- <!-- SW:SECTION:metarule version="1.0.183" -->
267
+ <!-- SW:SECTION:metarule version="1.0.184" -->
268
268
  ## Meta-Rule: Think-Before-Act
269
269
 
270
270
  **Satisfy dependencies BEFORE dependent operations.**
@@ -275,7 +275,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
275
275
  ```
276
276
  <!-- SW:END:metarule -->
277
277
 
278
- <!-- SW:SECTION:rules version="1.0.183" -->
278
+ <!-- SW:SECTION:rules version="1.0.184" -->
279
279
  ## Rules
280
280
 
281
281
  1. **Files** → `.specweave/increments/####-name/` (see Structure section for details)
@@ -286,7 +286,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
286
286
  6. **⛔ Marketplace refresh**: Use `specweave refresh-marketplace` CLI (not `scripts/refresh-marketplace.sh`)
287
287
  <!-- SW:END:rules -->
288
288
 
289
- <!-- SW:SECTION:workflow version="1.0.183" -->
289
+ <!-- SW:SECTION:workflow version="1.0.184" -->
290
290
  ## Workflow
291
291
 
292
292
  `/sw:increment "X"` → `/sw:do` → `/sw:progress` → `/sw:done 0001`
@@ -306,7 +306,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
306
306
  **Natural language**: "Let's build X" → `/sw:increment` | "What's status?" → `/sw:progress` | "We're done" → `/sw:done` | "Ship while sleeping" → `/sw:auto`
307
307
  <!-- SW:END:workflow -->
308
308
 
309
- <!-- SW:SECTION:reflect version="1.0.183" -->
309
+ <!-- SW:SECTION:reflect version="1.0.184" -->
310
310
  ## Skill Memories
311
311
 
312
312
  SpecWeave learns from corrections. Learnings saved here automatically. Edit or delete as needed.
@@ -329,7 +329,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
329
329
  - **2026-01-29**: in this codebase. Then use goToDefinition to show me where it's defined.
330
330
  - **2026-01-29**: ✗→✓ Find All References of handleAutoCommand using LSP The user wants me to find all references to handl
331
331
 
332
- <!-- SW:SECTION:context version="1.0.183" -->
332
+ <!-- SW:SECTION:context version="1.0.184" -->
333
333
  ## Context
334
334
 
335
335
  **Before implementing**: Check ADRs at `.specweave/docs/internal/architecture/adr/`
@@ -337,7 +337,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
337
337
  **Load context**: `/sw:context <topic>` loads relevant living docs into conversation
338
338
  <!-- SW:END:context -->
339
339
 
340
- <!-- SW:SECTION:structure version="1.0.183" -->
340
+ <!-- SW:SECTION:structure version="1.0.184" -->
341
341
  ## Structure
342
342
 
343
343
  ```
@@ -352,7 +352,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
352
352
  **Everything else → subfolders**: `reports/` | `logs/` | `scripts/` | `backups/`
353
353
  <!-- SW:END:structure -->
354
354
 
355
- <!-- SW:SECTION:taskformat version="1.0.183" -->
355
+ <!-- SW:SECTION:taskformat version="1.0.184" -->
356
356
  ## Task Format
357
357
 
358
358
  ```markdown
@@ -362,7 +362,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
362
362
  ```
363
363
  <!-- SW:END:taskformat -->
364
364
 
365
- <!-- SW:SECTION:secrets version="1.0.183" -->
365
+ <!-- SW:SECTION:secrets version="1.0.184" -->
366
366
  ## Secrets Check
367
367
 
368
368
  **BEFORE CLI tools**: Check existing config first!
@@ -376,7 +376,7 @@ gh auth status
376
376
  **SECURITY**: NEVER use `grep TOKEN .env` without `-q` flag - it exposes credentials in terminal!
377
377
  <!-- SW:END:secrets -->
378
378
 
379
- <!-- SW:SECTION:syncing version="1.0.183" -->
379
+ <!-- SW:SECTION:syncing version="1.0.184" -->
380
380
  ## External Sync (GitHub/JIRA/ADO)
381
381
 
382
382
  **Commands**: `/sw-github:sync {id}` (issues) | `/sw:sync-specs` (living docs only)
@@ -386,7 +386,7 @@ gh auth status
386
386
  **Config**: Set `sync.github.enabled: true` + `canUpdateExternalItems: true` in config.json
387
387
  <!-- SW:END:syncing -->
388
388
 
389
- <!-- SW:SECTION:testing version="1.0.183" -->
389
+ <!-- SW:SECTION:testing version="1.0.184" -->
390
390
  ## Testing
391
391
 
392
392
  BDD in tasks.md | Unit >80% | `.test.ts` (Vitest)
@@ -398,7 +398,7 @@ vi.mock('./module', () => ({ func: mockFn }));
398
398
  ```
399
399
  <!-- SW:END:testing -->
400
400
 
401
- <!-- SW:SECTION:tdd version="1.0.183" -->
401
+ <!-- SW:SECTION:tdd version="1.0.184" -->
402
402
  ## TDD Mode (Test-Driven Development)
403
403
 
404
404
  **When `testing.defaultTestMode: "TDD"` is configured**, follow RED-GREEN-REFACTOR discipline:
@@ -459,7 +459,7 @@ When TDD is enabled, tasks include phase markers:
459
459
  **Rule**: Complete dependencies BEFORE dependent tasks (RED before GREEN).
460
460
  <!-- SW:END:tdd -->
461
461
 
462
- <!-- SW:SECTION:api version="1.0.183" -->
462
+ <!-- SW:SECTION:api version="1.0.184" -->
463
463
  ## API Development (OpenAPI-First)
464
464
 
465
465
  **For API projects only.** Commands: `/sw:api-docs --all` | `--openapi` | `--postman` | `--validate`
@@ -467,13 +467,13 @@ When TDD is enabled, tasks include phase markers:
467
467
  Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
468
468
  <!-- SW:END:api -->
469
469
 
470
- <!-- SW:SECTION:limits version="1.0.183" -->
470
+ <!-- SW:SECTION:limits version="1.0.184" -->
471
471
  ## Limits
472
472
 
473
473
  **Max 1500 lines/file** — extract before adding
474
474
  <!-- SW:END:limits -->
475
475
 
476
- <!-- SW:SECTION:troubleshooting version="1.0.183" -->
476
+ <!-- SW:SECTION:troubleshooting version="1.0.184" -->
477
477
  ## Troubleshooting
478
478
 
479
479
  | Issue | Fix |
@@ -489,7 +489,7 @@ Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
489
489
  | Marketplace shows 0 | Normal with auto-load; `/plugin list` shows actual |
490
490
  <!-- SW:END:troubleshooting -->
491
491
 
492
- <!-- SW:SECTION:lazyloading version="1.0.183" -->
492
+ <!-- SW:SECTION:lazyloading version="1.0.184" -->
493
493
  ## Plugin Auto-Loading
494
494
 
495
495
  Plugins load automatically based on project type and keywords. Manual install if needed:
@@ -503,7 +503,7 @@ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
503
503
  **Token savings**: Core ~3-5K tokens vs all plugins ~60K+
504
504
  <!-- SW:END:lazyloading -->
505
505
 
506
- <!-- SW:SECTION:principles version="1.0.183" -->
506
+ <!-- SW:SECTION:principles version="1.0.184" -->
507
507
  ## Principles
508
508
 
509
509
  1. **Spec-first**: `/sw:increment` before coding
@@ -512,7 +512,7 @@ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
512
512
  4. **Traceable**: All work → specs → ACs
513
513
  <!-- SW:END:principles -->
514
514
 
515
- <!-- SW:SECTION:linking version="1.0.183" -->
515
+ <!-- SW:SECTION:linking version="1.0.184" -->
516
516
  ## Bidirectional Linking
517
517
 
518
518
  Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
@@ -520,7 +520,7 @@ Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
520
520
  Task format: `**AC**: AC-US1-01, AC-US1-02` (CRITICAL for linking)
521
521
  <!-- SW:END:linking -->
522
522
 
523
- <!-- SW:SECTION:mcp version="1.0.183" -->
523
+ <!-- SW:SECTION:mcp version="1.0.184" -->
524
524
  ## External Services
525
525
 
526
526
  **Priority**: CLI tools first (simpler) → MCP for complex integrations
@@ -542,7 +542,7 @@ claude mcp add --transport stdio postgres -- npx -y @modelcontextprotocol/server
542
542
  MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
543
543
  <!-- SW:END:mcp -->
544
544
 
545
- <!-- SW:SECTION:auto version="1.0.183" -->
545
+ <!-- SW:SECTION:auto version="1.0.184" -->
546
546
  ## Auto Mode
547
547
 
548
548
  **Commands**: `/sw:auto` (start) | `/sw:auto-status` (check) | `/sw:cancel-auto` (emergency only)
@@ -559,7 +559,7 @@ MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
559
559
  **STOP & ASK** if: Spec conflicts | Task unnecessary | Requirement ambiguous
560
560
  <!-- SW:END:auto -->
561
561
 
562
- <!-- SW:SECTION:docs version="1.0.183" -->
562
+ <!-- SW:SECTION:docs version="1.0.184" -->
563
563
  ## Docs
564
564
 
565
565
  [spec-weave.com](https://spec-weave.com)
package/bin/specweave.js CHANGED
@@ -868,6 +868,31 @@ program
868
868
  });
869
869
  });
870
870
 
871
+ // Doctor command - Comprehensive health check
872
+ program
873
+ .command('doctor')
874
+ .description('Run comprehensive health check on SpecWeave project')
875
+ .option('--verbose', 'Show detailed output for each check')
876
+ .option('--json', 'Output as JSON')
877
+ .option('--quick', 'Skip slow checks (network, hook execution)')
878
+ .option('--skip-external', 'Skip external tool connectivity checks')
879
+ .option('--fix', 'Run suggested fix command if issues found')
880
+ .action(async (options) => {
881
+ const { doctor } = await import('../dist/src/cli/commands/doctor.js');
882
+ const report = await doctor(process.cwd(), {
883
+ verbose: options.verbose,
884
+ json: options.json,
885
+ quick: options.quick,
886
+ skipExternal: options.skipExternal,
887
+ fix: options.fix,
888
+ });
889
+
890
+ // Exit with appropriate code (failures = 1)
891
+ if (report.summary.failures > 0) {
892
+ process.exit(1);
893
+ }
894
+ });
895
+
871
896
  // Detect intent command - Hook helper for automatic plugin loading
872
897
  program
873
898
  .command('detect-intent [prompt]')
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Doctor Command
3
+ *
4
+ * Comprehensive health check for SpecWeave projects.
5
+ * Runs diagnostic checks without modifying anything.
6
+ */
7
+ import { Command } from 'commander';
8
+ import type { DoctorOptions, DoctorReport } from '../../core/doctor/types.js';
9
+ /**
10
+ * Execute doctor command
11
+ *
12
+ * @param projectRoot - Project root directory (defaults to cwd)
13
+ * @param options - Command options
14
+ * @returns Doctor report
15
+ */
16
+ export declare function doctor(projectRoot?: string, options?: DoctorOptions): Promise<DoctorReport>;
17
+ /**
18
+ * Register doctor command
19
+ *
20
+ * @param program - Commander program
21
+ */
22
+ export declare function registerDoctorCommand(program: Command): void;
23
+ //# sourceMappingURL=doctor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG9E;;;;;;GAMG;AACH,wBAAsB,MAAM,CAC1B,WAAW,GAAE,MAAsB,EACnC,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC,CAUvB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2C5D"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Doctor Command
3
+ *
4
+ * Comprehensive health check for SpecWeave projects.
5
+ * Runs diagnostic checks without modifying anything.
6
+ */
7
+ import { runDoctor, formatDoctorReport } from '../../core/doctor/doctor.js';
8
+ import { consoleLogger as logger } from '../../utils/logger.js';
9
+ /**
10
+ * Execute doctor command
11
+ *
12
+ * @param projectRoot - Project root directory (defaults to cwd)
13
+ * @param options - Command options
14
+ * @returns Doctor report
15
+ */
16
+ export async function doctor(projectRoot = process.cwd(), options = {}) {
17
+ const report = await runDoctor(projectRoot, options);
18
+ if (options.json) {
19
+ console.log(JSON.stringify(report, null, 2));
20
+ }
21
+ else {
22
+ console.log(formatDoctorReport(report, options.verbose));
23
+ }
24
+ return report;
25
+ }
26
+ /**
27
+ * Register doctor command
28
+ *
29
+ * @param program - Commander program
30
+ */
31
+ export function registerDoctorCommand(program) {
32
+ program
33
+ .command('doctor')
34
+ .description('Run comprehensive health check on SpecWeave project')
35
+ .option('--verbose', 'Show detailed output for each check')
36
+ .option('--json', 'Output as JSON')
37
+ .option('--quick', 'Skip slow checks (network, hook execution)')
38
+ .option('--skip-external', 'Skip external tool connectivity checks')
39
+ .option('--fix', 'Run suggested fix command if issues found')
40
+ .action(async (options) => {
41
+ try {
42
+ const report = await doctor(process.cwd(), {
43
+ verbose: options.verbose,
44
+ json: options.json,
45
+ quick: options.quick,
46
+ skipExternal: options.skipExternal,
47
+ fix: options.fix,
48
+ });
49
+ // If --fix and issues found, suggest running the fix command
50
+ if (options.fix && report.fixCommand) {
51
+ console.log(`\nRunning fix: ${report.fixCommand}\n`);
52
+ const { execSync } = await import('child_process');
53
+ try {
54
+ execSync(report.fixCommand, {
55
+ cwd: process.cwd(),
56
+ stdio: 'inherit',
57
+ });
58
+ }
59
+ catch (fixError) {
60
+ logger.error(`Fix command failed: ${fixError}`);
61
+ process.exit(1);
62
+ }
63
+ }
64
+ // Exit with appropriate code
65
+ if (report.summary.failures > 0) {
66
+ process.exit(1);
67
+ }
68
+ }
69
+ catch (error) {
70
+ logger.error(`Doctor command failed: ${error}`);
71
+ process.exit(1);
72
+ }
73
+ });
74
+ }
75
+ //# sourceMappingURL=doctor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAE5E,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAC1B,cAAsB,OAAO,CAAC,GAAG,EAAE,EACnC,UAAyB,EAAE;IAE3B,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAErD,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAgB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AA6B;YAC7B,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC;gBAChC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,0BAA0B,KAAK,EAAE,CAAC,CAAC;YAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,12 +1,15 @@
1
1
  /**
2
- * Claude Code LSP Settings Auto-Configuration
2
+ * Claude Code LSP Plugin Auto-Configuration
3
3
  *
4
- * Automatically configures LSP servers in .claude/settings.json during
5
- * `specweave init` and `specweave update`.
4
+ * Automatically installs a local LSP plugin during `specweave init` and
5
+ * `specweave update` to enable code intelligence features like:
6
+ * - Go to Definition
7
+ * - Find References
8
+ * - Hover information
6
9
  *
7
- * This removes the need for users to manually set ENABLE_LSP_TOOL=1 or
8
- * configure LSP servers - it's all done automatically based on detected
9
- * project tech stack.
10
+ * This creates a local plugin at `.claude/plugins/specweave-lsp/` with
11
+ * proper `.lsp.json` configuration, which is the correct way to enable
12
+ * LSP in Claude Code (not via settings.json directly).
10
13
  */
11
14
  /**
12
15
  * LSP Server Configuration
@@ -29,15 +32,24 @@ export declare function detectTechStack(projectDir: string): string[];
29
32
  */
30
33
  export declare function buildLspServersConfig(techStack: string[]): Record<string, LspServerConfig>;
31
34
  /**
32
- * Ensure .claude/settings.json exists and has lspServers configured
35
+ * Install local LSP plugin to .claude/plugins/specweave-lsp/
33
36
  *
34
- * Called during `specweave init` to set up LSP automatically.
37
+ * This is the correct way to enable LSP in Claude Code - via a plugin
38
+ * with .lsp.json, not via settings.json directly.
39
+ */
40
+ export declare function installLocalLspPlugin(projectDir: string): Promise<boolean>;
41
+ /**
42
+ * Enable the local LSP plugin in settings.json
43
+ */
44
+ export declare function enableLspPluginInSettings(projectDir: string): Promise<void>;
45
+ /**
46
+ * Ensure LSP is configured during `specweave init`
47
+ *
48
+ * Creates a local LSP plugin and enables it in settings.json.
35
49
  */
36
50
  export declare function ensureClaudeSettingsWithLsp(projectDir: string): Promise<void>;
37
51
  /**
38
52
  * Ensure LSP settings exist during `specweave update`
39
- *
40
- * Adds lspServers if missing, preserves existing configuration.
41
53
  */
42
54
  export declare function ensureLspSettingsOnUpdate(projectDir: string): Promise<void>;
43
55
  //# sourceMappingURL=claude-settings-lsp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude-settings-lsp.d.ts","sourceRoot":"","sources":["../../../../../src/cli/helpers/init/claude-settings-lsp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AA2ED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,CAMpE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAgD5D;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAyB1F;AAED;;;;GAIG;AACH,wBAAsB,2BAA2B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoCnF;AAED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGjF"}
1
+ {"version":3,"file":"claude-settings-lsp.d.ts","sourceRoot":"","sources":["../../../../../src/cli/helpers/init/claude-settings-lsp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AASH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AA2ED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,CAMpE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAgD5D;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAyB1F;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAkChF;AAED;;GAEG;AACH,wBAAsB,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BjF;AAED;;;;GAIG;AACH,wBAAsB,2BAA2B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBnF;AAED;;GAEG;AACH,wBAAsB,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjF"}
@@ -1,15 +1,21 @@
1
1
  /**
2
- * Claude Code LSP Settings Auto-Configuration
2
+ * Claude Code LSP Plugin Auto-Configuration
3
3
  *
4
- * Automatically configures LSP servers in .claude/settings.json during
5
- * `specweave init` and `specweave update`.
4
+ * Automatically installs a local LSP plugin during `specweave init` and
5
+ * `specweave update` to enable code intelligence features like:
6
+ * - Go to Definition
7
+ * - Find References
8
+ * - Hover information
6
9
  *
7
- * This removes the need for users to manually set ENABLE_LSP_TOOL=1 or
8
- * configure LSP servers - it's all done automatically based on detected
9
- * project tech stack.
10
+ * This creates a local plugin at `.claude/plugins/specweave-lsp/` with
11
+ * proper `.lsp.json` configuration, which is the correct way to enable
12
+ * LSP in Claude Code (not via settings.json directly).
10
13
  */
11
14
  import * as fs from '../../../utils/fs-native.js';
12
15
  import * as path from 'path';
16
+ import { fileURLToPath } from 'url';
17
+ const __filename = fileURLToPath(import.meta.url);
18
+ const __dirname = path.dirname(__filename);
13
19
  /**
14
20
  * All supported LSP server configurations
15
21
  */
@@ -169,17 +175,45 @@ export function buildLspServersConfig(techStack) {
169
175
  return lspServers;
170
176
  }
171
177
  /**
172
- * Ensure .claude/settings.json exists and has lspServers configured
178
+ * Install local LSP plugin to .claude/plugins/specweave-lsp/
173
179
  *
174
- * Called during `specweave init` to set up LSP automatically.
180
+ * This is the correct way to enable LSP in Claude Code - via a plugin
181
+ * with .lsp.json, not via settings.json directly.
175
182
  */
176
- export async function ensureClaudeSettingsWithLsp(projectDir) {
177
- const claudeDir = path.join(projectDir, '.claude');
178
- const settingsPath = path.join(claudeDir, 'settings.json');
179
- // Ensure .claude directory exists
180
- if (!fs.existsSync(claudeDir)) {
181
- fs.mkdirSync(claudeDir, { recursive: true });
183
+ export async function installLocalLspPlugin(projectDir) {
184
+ const pluginDir = path.join(projectDir, '.claude', 'plugins', 'specweave-lsp');
185
+ const pluginJsonPath = path.join(pluginDir, '.claude-plugin', 'plugin.json');
186
+ const lspJsonPath = path.join(pluginDir, '.lsp.json');
187
+ // Skip if plugin already exists
188
+ if (fs.existsSync(pluginJsonPath) && fs.existsSync(lspJsonPath)) {
189
+ return false;
182
190
  }
191
+ // Detect tech stack
192
+ const techStack = detectTechStack(projectDir);
193
+ const lspServers = buildLspServersConfig(techStack);
194
+ // Create plugin directory structure
195
+ fs.mkdirSync(path.join(pluginDir, '.claude-plugin'), { recursive: true });
196
+ // Write plugin.json
197
+ const pluginJson = {
198
+ name: 'specweave-lsp',
199
+ version: '1.0.0',
200
+ description: 'Auto-configured LSP servers for code intelligence',
201
+ author: {
202
+ name: 'SpecWeave',
203
+ url: 'https://spec-weave.com',
204
+ },
205
+ keywords: ['lsp', 'code-intelligence'],
206
+ };
207
+ fs.writeFileSync(pluginJsonPath, JSON.stringify(pluginJson, null, 2) + '\n');
208
+ // Write .lsp.json with detected servers
209
+ fs.writeFileSync(lspJsonPath, JSON.stringify(lspServers, null, 2) + '\n');
210
+ return true;
211
+ }
212
+ /**
213
+ * Enable the local LSP plugin in settings.json
214
+ */
215
+ export async function enableLspPluginInSettings(projectDir) {
216
+ const settingsPath = path.join(projectDir, '.claude', 'settings.json');
183
217
  // Read existing settings or create new
184
218
  let settings = {};
185
219
  if (fs.existsSync(settingsPath)) {
@@ -187,30 +221,50 @@ export async function ensureClaudeSettingsWithLsp(projectDir) {
187
221
  settings = JSON.parse(fs.readFileSync(settingsPath, 'utf-8'));
188
222
  }
189
223
  catch {
190
- // Invalid JSON, start fresh but preserve the file
191
224
  settings = {};
192
225
  }
193
226
  }
194
- // Don't overwrite existing lspServers configuration
195
- if (settings.lspServers) {
196
- return;
197
- }
198
- // Detect tech stack
199
- const techStack = detectTechStack(projectDir);
200
- // Build LSP configuration
201
- const lspServers = buildLspServersConfig(techStack);
202
- // Merge with existing settings
203
- settings.lspServers = lspServers;
227
+ // Ensure .claude directory exists
228
+ fs.mkdirSync(path.join(projectDir, '.claude'), { recursive: true });
229
+ // Add plugin to enabledPlugins if not already there
230
+ const enabledPlugins = (settings.enabledPlugins || {});
231
+ // Enable the local plugin (path-based plugin)
232
+ enabledPlugins['./plugins/specweave-lsp'] = true;
233
+ settings.enabledPlugins = enabledPlugins;
204
234
  // Write back
205
235
  fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
206
236
  }
207
237
  /**
208
- * Ensure LSP settings exist during `specweave update`
238
+ * Ensure LSP is configured during `specweave init`
209
239
  *
210
- * Adds lspServers if missing, preserves existing configuration.
240
+ * Creates a local LSP plugin and enables it in settings.json.
241
+ */
242
+ export async function ensureClaudeSettingsWithLsp(projectDir) {
243
+ // Install the local LSP plugin
244
+ const installed = await installLocalLspPlugin(projectDir);
245
+ // Enable it in settings.json
246
+ await enableLspPluginInSettings(projectDir);
247
+ // For backwards compatibility, also add lspServers to settings.json
248
+ // (in case future Claude Code versions support this)
249
+ const settingsPath = path.join(projectDir, '.claude', 'settings.json');
250
+ if (fs.existsSync(settingsPath)) {
251
+ try {
252
+ const settings = JSON.parse(fs.readFileSync(settingsPath, 'utf-8'));
253
+ if (!settings.lspServers) {
254
+ const techStack = detectTechStack(projectDir);
255
+ settings.lspServers = buildLspServersConfig(techStack);
256
+ fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
257
+ }
258
+ }
259
+ catch {
260
+ // Ignore errors
261
+ }
262
+ }
263
+ }
264
+ /**
265
+ * Ensure LSP settings exist during `specweave update`
211
266
  */
212
267
  export async function ensureLspSettingsOnUpdate(projectDir) {
213
- // Same logic as init - only adds if missing
214
268
  await ensureClaudeSettingsWithLsp(projectDir);
215
269
  }
216
270
  //# sourceMappingURL=claude-settings-lsp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude-settings-lsp.js","sourceRoot":"","sources":["../../../../../src/cli/helpers/init/claude-settings-lsp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAW7B;;GAEG;AACH,MAAM,WAAW,GAAoC;IACnD,UAAU,EAAE;QACV,OAAO,EAAE,4BAA4B;QACrC,IAAI,EAAE,CAAC,SAAS,CAAC;QACjB,mBAAmB,EAAE;YACnB,KAAK,EAAE,YAAY;YACnB,MAAM,EAAE,iBAAiB;YACzB,KAAK,EAAE,YAAY;YACnB,MAAM,EAAE,iBAAiB;YACzB,MAAM,EAAE,YAAY;YACpB,MAAM,EAAE,YAAY;SACrB;KACF;IACD,MAAM,EAAE;QACN,OAAO,EAAE,oBAAoB;QAC7B,IAAI,EAAE,CAAC,SAAS,CAAC;QACjB,mBAAmB,EAAE;YACnB,KAAK,EAAE,QAAQ;Y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AC;IAEjC,aAAa;IACb,EAAE,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AAC3E,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,UAAkB;IAChE,4CAA4C;IAC5C,MAAM,2BAA2B,CAAC,UAAU,CAAC,CAAC;AAChD,CAAC"}
1
+ {"version":3,"file":"claude-settings-lsp.js","sourceRoot":"","sources":["../../../../../src/cli/helpers/init/claude-settings-lsp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAW3C;;GAEG;AACH,MAAM,WAAW,GAAoC;IACnD,UAAU,EAAE;QACV,OAAO,EAAE,4BAA4B;QACrC,IAAI,EAAE,CAAC,SAAS,CAAC;QACjB,mBAAmB,EAAE;YACnB,KAAK,EAAE,YAAY;YACnB,MAAM,EAAE,iBAAiB;YACzB,KAAK,EAAE,YAAY;YACnB,MAAM,EAAE,iBAAiB;YACzB,MAAM,EAAE,YAAY;YACpB,MAAM,EAAE,YAAY;SACrB;KACF;IACD,MAAM,EAAE;QACN,OAAO,EAAE,oBAAoB;QAC7B,IAAI,EAAE,CAAC,SAAS,CAAC;QACjB,mBAAmB,EAAE;YACnB,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,QAAQ;SACjB;KACF;IACD,EAAE,EAAE;QACF,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,CAAC,OAAO,CAAC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IAClE,+BAA+B;IAC/B,MAAM,SAAS,GAAG,MAAM,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAE1D,6BAA6B;IAC7B,MAAM,yBAAyB,CAAC,UAAU,CAAC,CAAC;IAE5C,oEAAoE;IACpE,qDAAqD;IACrD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;IACvE,IAAI,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAChC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC;YACpE,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;gBACzB,MAAM,SAAS,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;gBAC9C,QAAQ,CAAC,UAAU,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC;gBACvD,EAAE,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;YAC3E,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,gBAAgB;QAClB,CAAC;IACH,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,UAAkB;IAChE,MAAM,2BAA2B,CAAC,UAAU,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Configuration Checker - validates config.json, CLAUDE.md freshness, etc.
3
+ */
4
+ import type { HealthChecker, CategoryResult, DoctorOptions } from '../types.js';
5
+ export declare class ConfigurationChecker implements HealthChecker {
6
+ category: string;
7
+ check(projectRoot: string, _options: DoctorOptions): Promise<CategoryResult>;
8
+ private checkConfigJson;
9
+ private checkClaudeMd;
10
+ private checkAgentsMd;
11
+ private checkEnvFile;
12
+ private compareVersions;
13
+ }
14
+ //# sourceMappingURL=configuration-checker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration-checker.d.ts","sourceRoot":"","sources":["../../../../../src/core/doctor/checkers/configuration-checker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EAEd,aAAa,EACd,MAAM,aAAa,CAAC;AAMrB,qBAAa,oBAAqB,YAAW,aAAa;IACxD,QAAQ,SAAmB;IAErB,KAAK,CACT,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,aAAa,GACtB,OAAO,CAAC,cAAc,CAAC;IAsB1B,OAAO,CAAC,eAAe;IA+BvB,OAAO,CAAC,aAAa;IA2DrB,OAAO,CAAC,aAAa;IAsCrB,OAAO,CAAC,YAAY;IA4CpB,OAAO,CAAC,eAAe;CAYxB"}