milens 0.7.0 → 0.7.1

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 (182) hide show
  1. package/.agents/skills/adapters/SKILL.md +54 -51
  2. package/.agents/skills/analyzer/SKILL.md +16 -19
  3. package/.agents/skills/apps/SKILL.md +60 -68
  4. package/.agents/skills/docs/SKILL.md +5 -25
  5. package/.agents/skills/milens/SKILL.md +6 -6
  6. package/.agents/skills/orchestrator/SKILL.md +8 -10
  7. package/.agents/skills/parser/SKILL.md +9 -11
  8. package/.agents/skills/root/SKILL.md +25 -29
  9. package/.agents/skills/scripts/SKILL.md +13 -16
  10. package/.agents/skills/security/SKILL.md +4 -9
  11. package/.agents/skills/server/SKILL.md +28 -25
  12. package/.agents/skills/store/SKILL.md +17 -21
  13. package/.agents/skills/test/SKILL.md +14 -19
  14. package/.agents/skills/ui/SKILL.md +1 -1
  15. package/README.md +12 -3
  16. package/adapters/README.md +144 -107
  17. package/adapters/claude-code/.claude/settings.json.hooks-snippet.json +26 -0
  18. package/adapters/claude-code/.claude-plugin/plugin.json +11 -0
  19. package/adapters/claude-code/.mcp.json +9 -0
  20. package/adapters/codex/.codex/config.toml +3 -0
  21. package/adapters/copilot/.vscode/mcp.json +10 -0
  22. package/adapters/cursor/.cursor/mcp.json +9 -0
  23. package/adapters/cursor/.cursorrules +69 -9
  24. package/adapters/gemini/.gemini/settings.json +9 -0
  25. package/dist/agents-md.d.ts +0 -1
  26. package/dist/agents-md.js +2 -2
  27. package/dist/agents-md.js.map +1 -1
  28. package/dist/analyzer/config.d.ts +0 -1
  29. package/dist/analyzer/engine.d.ts +0 -1
  30. package/dist/analyzer/engine.js +42 -40
  31. package/dist/analyzer/engine.js.map +1 -1
  32. package/dist/analyzer/enrich.d.ts +0 -1
  33. package/dist/analyzer/enrich.js +13 -0
  34. package/dist/analyzer/enrich.js.map +1 -1
  35. package/dist/analyzer/resolver.d.ts +0 -1
  36. package/dist/analyzer/resolver.js +48 -4
  37. package/dist/analyzer/resolver.js.map +1 -1
  38. package/dist/analyzer/review.d.ts +2 -2
  39. package/dist/analyzer/review.js +7 -59
  40. package/dist/analyzer/review.js.map +1 -1
  41. package/dist/analyzer/risk.d.ts +20 -0
  42. package/dist/analyzer/risk.js +76 -0
  43. package/dist/analyzer/risk.js.map +1 -0
  44. package/dist/analyzer/scanner.d.ts +0 -1
  45. package/dist/analyzer/scanner.js +2 -4
  46. package/dist/analyzer/scanner.js.map +1 -1
  47. package/dist/analyzer/scope-resolver.d.ts +0 -1
  48. package/dist/analyzer/scope-resolver.js +1 -1
  49. package/dist/analyzer/scope-resolver.js.map +1 -1
  50. package/dist/build-info.d.ts +2 -0
  51. package/dist/build-info.js +4 -0
  52. package/dist/build-info.js.map +1 -0
  53. package/dist/cli.d.ts +0 -1
  54. package/dist/cli.js +142 -16
  55. package/dist/cli.js.map +1 -1
  56. package/dist/metrics.d.ts +0 -1
  57. package/dist/orchestrator/orchestrator.d.ts +0 -1
  58. package/dist/orchestrator/orchestrator.js +16 -1
  59. package/dist/orchestrator/orchestrator.js.map +1 -1
  60. package/dist/orchestrator/reporter.d.ts +0 -1
  61. package/dist/parser/extract.d.ts +0 -1
  62. package/dist/parser/extract.js +53 -28
  63. package/dist/parser/extract.js.map +1 -1
  64. package/dist/parser/lang-css.d.ts +0 -1
  65. package/dist/parser/lang-go.d.ts +0 -1
  66. package/dist/parser/lang-html.d.ts +0 -1
  67. package/dist/parser/lang-java.d.ts +0 -1
  68. package/dist/parser/lang-js.d.ts +0 -1
  69. package/dist/parser/lang-md.d.ts +0 -1
  70. package/dist/parser/lang-php.d.ts +0 -1
  71. package/dist/parser/lang-py.d.ts +0 -1
  72. package/dist/parser/lang-ruby.d.ts +0 -1
  73. package/dist/parser/lang-rust.d.ts +0 -1
  74. package/dist/parser/lang-ts.d.ts +0 -1
  75. package/dist/parser/lang-vue.d.ts +0 -1
  76. package/dist/parser/language-provider.d.ts +0 -1
  77. package/dist/parser/languages.d.ts +0 -1
  78. package/dist/parser/loader.d.ts +0 -1
  79. package/dist/security/deps.d.ts +0 -1
  80. package/dist/security/rules.d.ts +0 -1
  81. package/dist/security/rules.js +13 -12
  82. package/dist/security/rules.js.map +1 -1
  83. package/dist/server/hooks.d.ts +0 -1
  84. package/dist/server/mcp-prompts.d.ts +0 -1
  85. package/dist/server/mcp-prompts.js +509 -523
  86. package/dist/server/mcp-prompts.js.map +1 -1
  87. package/dist/server/mcp.d.ts +0 -1
  88. package/dist/server/mcp.js +156 -655
  89. package/dist/server/mcp.js.map +1 -1
  90. package/dist/server/test-plan.d.ts +0 -1
  91. package/dist/server/tools/deps.d.ts +28 -0
  92. package/dist/server/tools/deps.js +2 -0
  93. package/dist/server/tools/deps.js.map +1 -0
  94. package/dist/server/tools/resources.d.ts +3 -0
  95. package/dist/server/tools/resources.js +103 -0
  96. package/dist/server/tools/resources.js.map +1 -0
  97. package/dist/server/tools/security.d.ts +3 -0
  98. package/dist/server/tools/security.js +176 -0
  99. package/dist/server/tools/security.js.map +1 -0
  100. package/dist/server/tools/session.d.ts +3 -0
  101. package/dist/server/tools/session.js +140 -0
  102. package/dist/server/tools/session.js.map +1 -0
  103. package/dist/server/tools/testing.d.ts +3 -0
  104. package/dist/server/tools/testing.js +200 -0
  105. package/dist/server/tools/testing.js.map +1 -0
  106. package/dist/server/watcher.d.ts +0 -1
  107. package/dist/server/watcher.js +1 -1
  108. package/dist/server/watcher.js.map +1 -1
  109. package/dist/skills.d.ts +0 -1
  110. package/dist/skills.js +8 -2
  111. package/dist/skills.js.map +1 -1
  112. package/dist/store/annotations.d.ts +1 -1
  113. package/dist/store/annotations.js +14 -3
  114. package/dist/store/annotations.js.map +1 -1
  115. package/dist/store/confidence.d.ts +0 -1
  116. package/dist/store/confidence.js +2 -0
  117. package/dist/store/confidence.js.map +1 -1
  118. package/dist/store/db.d.ts +9 -1
  119. package/dist/store/db.js +87 -20
  120. package/dist/store/db.js.map +1 -1
  121. package/dist/store/registry.d.ts +0 -1
  122. package/dist/store/vectors.d.ts +0 -1
  123. package/dist/types.d.ts +7 -1
  124. package/dist/ui/progress.d.ts +0 -1
  125. package/dist/uninstall.d.ts +0 -1
  126. package/dist/utils.d.ts +2 -1
  127. package/dist/utils.js +0 -0
  128. package/dist/utils.js.map +1 -1
  129. package/package.json +11 -8
  130. package/dist/agents-md.d.ts.map +0 -1
  131. package/dist/analyzer/config.d.ts.map +0 -1
  132. package/dist/analyzer/engine.d.ts.map +0 -1
  133. package/dist/analyzer/enrich.d.ts.map +0 -1
  134. package/dist/analyzer/resolver.d.ts.map +0 -1
  135. package/dist/analyzer/review.d.ts.map +0 -1
  136. package/dist/analyzer/scanner.d.ts.map +0 -1
  137. package/dist/analyzer/scope-resolver.d.ts.map +0 -1
  138. package/dist/analyzer/testplan.d.ts +0 -59
  139. package/dist/analyzer/testplan.d.ts.map +0 -1
  140. package/dist/analyzer/testplan.js +0 -218
  141. package/dist/analyzer/testplan.js.map +0 -1
  142. package/dist/cli.d.ts.map +0 -1
  143. package/dist/metrics.d.ts.map +0 -1
  144. package/dist/orchestrator/orchestrator.d.ts.map +0 -1
  145. package/dist/orchestrator/reporter.d.ts.map +0 -1
  146. package/dist/parser/extract.d.ts.map +0 -1
  147. package/dist/parser/lang-css.d.ts.map +0 -1
  148. package/dist/parser/lang-go.d.ts.map +0 -1
  149. package/dist/parser/lang-html.d.ts.map +0 -1
  150. package/dist/parser/lang-java.d.ts.map +0 -1
  151. package/dist/parser/lang-js.d.ts.map +0 -1
  152. package/dist/parser/lang-md.d.ts.map +0 -1
  153. package/dist/parser/lang-php.d.ts.map +0 -1
  154. package/dist/parser/lang-py.d.ts.map +0 -1
  155. package/dist/parser/lang-ruby.d.ts.map +0 -1
  156. package/dist/parser/lang-rust.d.ts.map +0 -1
  157. package/dist/parser/lang-ts.d.ts.map +0 -1
  158. package/dist/parser/lang-vue.d.ts.map +0 -1
  159. package/dist/parser/language-provider.d.ts.map +0 -1
  160. package/dist/parser/languages.d.ts.map +0 -1
  161. package/dist/parser/loader.d.ts.map +0 -1
  162. package/dist/security/deps.d.ts.map +0 -1
  163. package/dist/security/rules.d.ts.map +0 -1
  164. package/dist/server/hooks.d.ts.map +0 -1
  165. package/dist/server/mcp-prompts.d.ts.map +0 -1
  166. package/dist/server/mcp.d.ts.map +0 -1
  167. package/dist/server/test-plan.d.ts.map +0 -1
  168. package/dist/server/watcher.d.ts.map +0 -1
  169. package/dist/skills.d.ts.map +0 -1
  170. package/dist/store/annotations.d.ts.map +0 -1
  171. package/dist/store/confidence.d.ts.map +0 -1
  172. package/dist/store/db.d.ts.map +0 -1
  173. package/dist/store/registry.d.ts.map +0 -1
  174. package/dist/store/vectors.d.ts.map +0 -1
  175. package/dist/types.d.ts.map +0 -1
  176. package/dist/ui/progress.d.ts.map +0 -1
  177. package/dist/uninstall.d.ts.map +0 -1
  178. package/dist/utils.d.ts.map +0 -1
  179. package/docs/README.md +0 -25
  180. package/docs/diagram1.svg +0 -1
  181. package/docs/diagram2.svg +0 -1
  182. package/docs/diagram3.svg +0 -1
@@ -26,18 +26,18 @@ When working with code in **security/**, follow these mandatory safety rules:
26
26
  | See file symbols | `mcp_milens_get_file_symbols` |
27
27
 
28
28
  ## Overview
29
- Contains 44 symbols (15 exported) across 2 files.
29
+ Contains 45 symbols (15 exported) across 2 files.
30
30
 
31
31
  ## Key Symbols
32
- - **`loadRules`** [function] (src/security/rules.ts:1301) — 6 refs
32
+ - **`loadRules`** [function] (src/security/rules.ts:1302) — 6 refs
33
33
  - **`auditDependencies`** [function] (src/security/deps.ts:732) — 4 refs
34
34
  - **`detectEcosystem`** [function] (src/security/deps.ts:512) — 3 refs
35
35
  - **`parseDependencies`** [function] (src/security/deps.ts:524) — 3 refs
36
36
  - **`checkVulnerabilities`** [function] (src/security/deps.ts:687) — 3 refs
37
37
  - **`Ecosystem`** [type] (src/security/deps.ts:8) — 3 refs
38
38
  - **`VulnerabilityReport`** [interface] (src/security/deps.ts:26) — 2 refs
39
- - **`getRulesByCategory`** [function] (src/security/rules.ts:1308) — 2 refs
40
- - **`getRulesBySeverity`** [function] (src/security/rules.ts:1312) — 2 refs
39
+ - **`getRulesByCategory`** [function] (src/security/rules.ts:1309) — 2 refs
40
+ - **`getRulesBySeverity`** [function] (src/security/rules.ts:1313) — 2 refs
41
41
  - **`SecurityCategory`** [type] (src/security/rules.ts:3) — 1 refs
42
42
  - **`Dependency`** [interface] (src/security/deps.ts:10) — 0 refs
43
43
  - **`Vulnerability`** [interface] (src/security/deps.ts:16) — 0 refs
@@ -52,11 +52,6 @@ Contains 44 symbols (15 exported) across 2 files.
52
52
  - **`detectEcosystem`** [function] — 3 incoming references
53
53
  - **`parseDependencies`** [function] — 3 incoming references
54
54
 
55
- ## Dependencies
56
- - **scripts**: `version`
57
- - **test**: `add`
58
- - **root**: `has`
59
-
60
55
  ## Used By
61
56
  - **root**: `loadRules`, `auditDependencies`
62
57
  - **server**: `loadRules`
@@ -26,49 +26,52 @@ When working with code in **server/**, follow these mandatory safety rules:
26
26
  | See file symbols | `mcp_milens_get_file_symbols` |
27
27
 
28
28
  ## Overview
29
- Contains 102 symbols (16 exported) across 5 files.
29
+ Contains 113 symbols (22 exported) across 10 files.
30
30
 
31
31
  ## Key Symbols
32
- - **`HookManager`** [class] (src/server/hooks.ts:43) — 8 refs
32
+ - **`HookManager`** [class] (src/server/hooks.ts:43) — 9 refs
33
+ - **`Deps`** [interface] (src/server/tools/deps.ts:4) — 9 refs
34
+ - **`defaultOnSessionStart`** [function] (src/server/hooks.ts:100) — 8 refs
35
+ - **`defaultOnSessionEnd`** [function] (src/server/hooks.ts:174) — 8 refs
36
+ - **`defaultOnPreCompact`** [function] (src/server/hooks.ts:350) — 8 refs
37
+ - **`defaultOnPostCompact`** [function] (src/server/hooks.ts:368) — 8 refs
33
38
  - **`HookConfig`** [interface] (src/server/hooks.ts:5) — 5 refs
34
- - **`defaultOnSessionStart`** [function] (src/server/hooks.ts:100) — 4 refs
35
- - **`defaultOnSessionEnd`** [function] (src/server/hooks.ts:174) — 4 refs
39
+ - **`FileWatcher`** [class] (src/server/watcher.ts:50) — 5 refs
36
40
  - **`defaultOnPreCommit`** [function] (src/server/hooks.ts:237) — 4 refs
37
41
  - **`defaultOnFileChange`** [function] (src/server/hooks.ts:323) — 4 refs
38
- - **`defaultOnPreCompact`** [function] (src/server/hooks.ts:350) — 4 refs
39
- - **`defaultOnPostCompact`** [function] (src/server/hooks.ts:368) — 4 refs
40
42
  - **`SessionContext`** [interface] (src/server/hooks.ts:15) — 4 refs
41
- - **`registerAllPrompts`** [function] (src/server/mcp-prompts.ts:637) — 4 refs
42
- - **`createMcpServer`** [function] (src/server/mcp.ts:451) — 4 refs
43
- - **`generateTestPlan`** [function] (src/server/test-plan.ts:39) — 4 refs
44
- - **`FileWatcher`** [class] (src/server/watcher.ts:50) — 3 refs
45
- - **`startStdio`** [function] (src/server/mcp.ts:2975) — 2 refs
46
- - **`startHttp`** [function] (src/server/mcp.ts:3014) — 2 refs
43
+ - **`registerAllPrompts`** [function] (src/server/mcp-prompts.ts:623) — 4 refs
44
+ - **`createMcpServer`** [function] (src/server/mcp.ts:452) — 4 refs
45
+ - **`startStdio`** [function] (src/server/mcp.ts:2306) — 4 refs
46
+ - **`startHttp`** [function] (src/server/mcp.ts:2363) — 4 refs
47
47
 
48
48
  ## Entry Points
49
- - **`get`** [method] — 13 incoming references
50
- - **`HookManager`** [class] — 8 incoming references
51
- - **`loadConfig`** [method] — 7 incoming references
52
- - **`HookConfig`** [interface] — 5 incoming references
53
- - **`defaultOnSessionStart`** [function] — 4 incoming references
49
+ - **`HookManager`** [class] — 9 incoming references
50
+ - **`Deps`** [interface] — 9 incoming references
51
+ - **`defaultOnSessionStart`** [function] — 8 incoming references
52
+ - **`defaultOnSessionEnd`** [function] — 8 incoming references
53
+ - **`defaultOnPreCompact`** [function] — 8 incoming references
54
54
 
55
55
  ## Dependencies
56
- - **store**: `Database`, `AnnotationStore`, `RepoRegistry`, `runDecayPass`, `getCodebaseSummary`, `recall`, `close`, `getStats` (+36 more)
57
- - **root**: `generateCrossRefSection`, `has`
58
- - **analyzer**: `reviewPr`, `analyze`, `resolve`, `clear`
56
+ - **store**: `Database`, `AnnotationStore`, `RepoRegistry`, `runDecayPass`, `getCodebaseSummary`, `recall`, `getStats`, `getTestCoverage` (+36 more)
57
+ - **root**: `generateCrossRefSection`, `globToRegex`
58
+ - **analyzer**: `reviewPr`, `countDependentFiles`, `analyze`
59
59
  - **parser**: `getParser`, `loadLanguage`, `ALL_LANGS`
60
- - **security**: `loadRules`
61
60
  - **orchestrator**: `Orchestrator`, `loadSnapshots`, `snapshot`, `persistSnapshots`, `compare`, `runAndFormat`
62
- - **test**: `add`, `dbPath`
63
- - **scripts**: `root`
61
+ - **security**: `loadRules`
64
62
 
65
63
  ## Used By
66
- - **root**: `startHttp`, `startStdio`, `HookManager`, `get`, `enableHook`, `loadConfig`, `saveConfig`, `disableHook`
67
- - **test**: `HookManager`, `HookConfig`, `defaultOnSessionStart`, `defaultOnSessionEnd`, `defaultOnPreCommit`, `defaultOnFileChange`, `defaultOnPreCompact`, `defaultOnPostCompact` (+10 more)
64
+ - **root**: `startHttp`, `startStdio`, `HookManager`, `defaultOnSessionStart`, `defaultOnSessionEnd`, `defaultOnPreCompact`, `defaultOnPostCompact`, `enableHook` (+3 more)
65
+ - **test**: `defaultOnSessionStart`, `defaultOnPreCompact`, `defaultOnSessionEnd`, `defaultOnPostCompact`, `HookManager`, `HookConfig`, `defaultOnPreCommit`, `defaultOnFileChange` (+19 more)
68
66
 
69
67
  ## Files
70
68
  - src/server/hooks.ts
71
69
  - src/server/mcp-prompts.ts
72
70
  - src/server/mcp.ts
73
71
  - src/server/test-plan.ts
72
+ - src/server/tools/deps.ts
73
+ - src/server/tools/resources.ts
74
+ - src/server/tools/security.ts
75
+ - src/server/tools/session.ts
76
+ - src/server/tools/testing.ts
74
77
  - src/server/watcher.ts
@@ -26,46 +26,42 @@ When working with code in **store/**, follow these mandatory safety rules:
26
26
  | See file symbols | `mcp_milens_get_file_symbols` |
27
27
 
28
28
  ## Overview
29
- Contains 135 symbols (15 exported) across 5 files.
29
+ Contains 139 symbols (15 exported) across 5 files.
30
30
 
31
31
  ## Key Symbols
32
32
  - **`Database`** [class] (src/store/db.ts:10) — 80 refs
33
- - **`AnnotationStore`** [class] (src/store/annotations.ts:10) — 19 refs
33
+ - **`AnnotationStore`** [class] (src/store/annotations.ts:10) — 21 refs
34
34
  - **`RepoRegistry`** [class] (src/store/registry.ts:18) — 16 refs
35
- - **`runDecayPass`** [function] (src/store/confidence.ts:85) — 6 refs
35
+ - **`runDecayPass`** [function] (src/store/confidence.ts:87) — 6 refs
36
36
  - **`buildEmbeddingText`** [function] (src/store/vectors.ts:250) — 4 refs
37
37
  - **`TfIdfProvider`** [class] (src/store/vectors.ts:44) — 4 refs
38
38
  - **`EmbeddingStore`** [class] (src/store/vectors.ts:170) — 4 refs
39
- - **`decayConfidence`** [function] (src/store/confidence.ts:22) — 3 refs
39
+ - **`decayConfidence`** [function] (src/store/confidence.ts:23) — 3 refs
40
40
  - **`boostConfidence`** [function] (src/store/confidence.ts:6) — 2 refs
41
- - **`getStaleAnnotations`** [function] (src/store/confidence.ts:38) — 2 refs
42
- - **`promoteSecurityAnnotations`** [function] (src/store/confidence.ts:48) — 2 refs
43
- - **`autoPromote`** [function] (src/store/confidence.ts:106) — 2 refs
41
+ - **`getStaleAnnotations`** [function] (src/store/confidence.ts:40) — 2 refs
42
+ - **`promoteSecurityAnnotations`** [function] (src/store/confidence.ts:50) — 2 refs
43
+ - **`autoPromote`** [function] (src/store/confidence.ts:108) — 2 refs
44
44
  - **`EmbeddingProvider`** [interface] (src/store/vectors.ts:15) — 2 refs
45
45
  - **`NeuralProvider`** [class] (src/store/vectors.ts:122) — 0 refs
46
46
  - **`SimilarResult`** [interface] (src/store/vectors.ts:23) — 0 refs
47
47
 
48
48
  ## Entry Points
49
49
  - **`Database`** [class] — 80 incoming references
50
- - **`close`** [method] — 33 incoming references
51
- - **`get`** [method] — 23 incoming references
52
- - **`AnnotationStore`** [class] — 19 incoming references
50
+ - **`AnnotationStore`** [class] — 21 incoming references
53
51
  - **`RepoRegistry`** [class] — 16 incoming references
52
+ - **`findSymbolById`** [method] — 14 incoming references
53
+ - **`rowToSymbol`** [function] — 13 incoming references
54
54
 
55
55
  ## Dependencies
56
- - **root**: `Annotation`, `AnnotationKey`, `Session`, `EvolutionEvent`, `CodeSymbol`, `SymbolLink`, `RepoEntry`, `has` (+1 more)
57
- - **test**: `add`, `dbPath`
58
- - **analyzer**: `resolve`
56
+ - **root**: `Annotation`, `AnnotationKey`, `Session`, `EvolutionEvent`, `CodeSymbol`, `SymbolLink`, `RepoEntry`
59
57
 
60
58
  ## Used By
61
- - **root**: `Database`, `RepoRegistry`, `AnnotationStore`, `runDecayPass`, `getIncomingLinks`, `getAllSymbols`, `getCodebaseSummary`, `register` (+24 more)
62
- - **analyzer**: `Database`, `TfIdfProvider`, `EmbeddingStore`, `buildEmbeddingText`, `get`, `isFileUpToDate`, `upsertFileHash`, `getSymbolsByFile` (+22 more)
63
- - **orchestrator**: `Database`, `findSymbolByName`, `findUpstream`, `clear`, `getTestCoverageGaps`, `findDeadCode`, `close`
64
- - **server**: `Database`, `AnnotationStore`, `RepoRegistry`, `runDecayPass`, `getCodebaseSummary`, `recall`, `close`, `getStats` (+36 more)
65
- - **test**: `Database`, `AnnotationStore`, `RepoRegistry`, `boostConfidence`, `decayConfidence`, `getStaleAnnotations`, `promoteSecurityAnnotations`, `runDecayPass` (+77 more)
66
- - **apps**: `remove`, `getAnnotations`, `Database`, `getCodebaseSummary`, `close`
67
- - **docs**: `remove`
68
- - **scripts**: `Database`, `getCodebaseSummary`, `close`
59
+ - **root**: `Database`, `RepoRegistry`, `AnnotationStore`, `runDecayPass`, `getIncomingLinks`, `getAllSymbols`, `getCodebaseSummary`, `findDbPath` (+22 more)
60
+ - **analyzer**: `Database`, `TfIdfProvider`, `EmbeddingStore`, `buildEmbeddingText`, `isFileUpToDate`, `upsertFileHash`, `getSymbolsByFile`, `transaction` (+18 more)
61
+ - **orchestrator**: `Database`, `findSymbolByName`, `findUpstream`, `getTestCoverageGaps`, `findDeadCode`
62
+ - **server**: `Database`, `AnnotationStore`, `RepoRegistry`, `runDecayPass`, `getCodebaseSummary`, `recall`, `getStats`, `getTestCoverage` (+36 more)
63
+ - **test**: `Database`, `AnnotationStore`, `RepoRegistry`, `boostConfidence`, `decayConfidence`, `getStaleAnnotations`, `promoteSecurityAnnotations`, `runDecayPass` (+76 more)
64
+ - **apps**: `remove`, `getAnnotations`, `Database`, `getCodebaseSummary`
69
65
  - **parser**: `load`
70
66
 
71
67
  ## Files
@@ -26,13 +26,12 @@ When working with code in **test/**, follow these mandatory safety rules:
26
26
  | See file symbols | `mcp_milens_get_file_symbols` |
27
27
 
28
28
  ## Overview
29
- Contains 328 symbols (119 exported) across 77 files.
29
+ Contains 351 symbols (119 exported) across 80 files.
30
30
 
31
31
  ## Key Symbols
32
32
  - **`User`** [class] (test/fixtures/accuracy/py-project/src/models.py:1) — 6 refs
33
33
  - **`Calculator`** [class] (test/fixtures/accuracy/js-project/src/calculator.js:1) — 5 refs
34
34
  - **`User`** [interface] (test/fixtures/ts-project/src/models.ts:1) — 5 refs
35
- - **`save`** [method] (test/fixtures/accuracy/py-project/src/models.py:14) — 4 refs
36
35
  - **`User`** [interface] (test/fixtures/accuracy/ts-project/src/models.ts:1) — 3 refs
37
36
  - **`User`** [class] (test/fixtures/py-project/models.py:1) — 3 refs
38
37
  - **`User`** [class] (test/fixtures/accuracy/ruby-project/src/models.rb:1) — 3 refs
@@ -43,35 +42,28 @@ Contains 328 symbols (119 exported) across 77 files.
43
42
  - **`UserService`** [class] (test/fixtures/ts-project/src/nest-sample.ts:27) — 2 refs
44
43
  - **`Save`** [method] (test/fixtures/accuracy/go-project/src/models/user.go:16) — 2 refs
45
44
  - **`UserRepo`** [class] (test/fixtures/accuracy/py-project/src/models.py:10) — 2 refs
45
+ - **`save`** [method] (test/fixtures/accuracy/py-project/src/models.py:14) — 2 refs
46
46
  - **`UserService`** [class] (test/fixtures/accuracy/py-project/src/service.py:4) — 2 refs
47
47
 
48
48
  ## Entry Points
49
- - **`add`** [method] — 46 incoming references
50
- - **`lang`** [variable] — 12 incoming references
51
- - **`dbPath`** [function] — 10 incoming references
49
+ - **`dbPath`** [function] — 8 incoming references
52
50
  - **`User`** [class] — 6 incoming references
53
51
  - **`Calculator`** [class] — 5 incoming references
52
+ - **`User`** [interface] — 5 incoming references
53
+ - **`lang`** [variable] — 5 incoming references
54
54
 
55
55
  ## Dependencies
56
- - **analyzer**: `analyze`, `loadAliases`, `getCachedTree`, `clearTreeCache`, `enrichMetadata`, `resolveLinksWithStats`, `resolveLinks`, `reviewSymbol` (+10 more)
57
- - **store**: `Database`, `AnnotationStore`, `RepoRegistry`, `boostConfidence`, `decayConfidence`, `getStaleAnnotations`, `promoteSecurityAnnotations`, `runDecayPass` (+77 more)
56
+ - **analyzer**: `analyze`, `loadAliases`, `getCachedTree`, `clearTreeCache`, `enrichMetadata`, `resolveLinksWithStats`, `resolveLinks`, `reviewSymbol` (+9 more)
57
+ - **store**: `Database`, `AnnotationStore`, `RepoRegistry`, `boostConfidence`, `decayConfidence`, `getStaleAnnotations`, `promoteSecurityAnnotations`, `runDecayPass` (+76 more)
58
58
  - **root**: `generateAgentsMd`, `AnnotationKey`, `CodeSymbol`, `SymbolLink`, `computeMetrics`, `formatMetricsReport`, `MilensMetrics`, `RawImport` (+17 more)
59
+ - **server**: `defaultOnSessionStart`, `defaultOnPreCompact`, `defaultOnSessionEnd`, `defaultOnPostCompact`, `HookManager`, `HookConfig`, `defaultOnPreCommit`, `defaultOnFileChange` (+19 more)
59
60
  - **security**: `detectEcosystem`, `parseDependencies`, `checkVulnerabilities`, `auditDependencies`, `loadRules`, `getRulesByCategory`, `getRulesBySeverity`
60
61
  - **parser**: `getParser`, `loadLanguage`, `extractFromTree`, `extractVueScript`, `extractVueTemplateRefs`, `extractVueCompositionApi`, `extractVueTemplateAst`, `spec` (+11 more)
61
- - **server**: `HookManager`, `HookConfig`, `defaultOnSessionStart`, `defaultOnSessionEnd`, `defaultOnPreCommit`, `defaultOnFileChange`, `defaultOnPreCompact`, `defaultOnPostCompact` (+10 more)
62
62
  - **orchestrator**: `Orchestrator`, `formatReport`, `OrchestratorReport`, `subscribe`, `run`, `snapshot`, `compare`, `cancel` (+3 more)
63
- - **scripts**: `root`
63
+ - **scripts**: `detectTypeFromBranch`, `detectScopeFromBranch`, `detectBreakingFromBranch`, `detectBreakingFromLabels`, `slugify`, `parseArgs`, `generateTitle`, `generateBody` (+1 more)
64
64
 
65
65
  ## Used By
66
- - **apps**: `add`, `dbPath`
67
- - **docs**: `add`
68
- - **root**: `add`, `dbPath`
69
- - **analyzer**: `add`, `parser`, `lang`
70
- - **orchestrator**: `add`
71
- - **parser**: `lang`, `add`, `parser`
72
- - **security**: `add`
73
- - **server**: `add`, `dbPath`
74
- - **store**: `add`, `dbPath`
66
+ - **apps**: `create`
75
67
 
76
68
  ## Files
77
69
  - test/fixtures/accuracy/go-project/src/admin.go
@@ -133,21 +125,24 @@ Contains 328 symbols (119 exported) across 77 files.
133
125
  - test/unit/markdown.test.ts
134
126
  - test/unit/mcp-prompts.test.ts
135
127
  - test/unit/mcp-tools.test.ts
128
+ - test/unit/mcp-transport.test.ts
136
129
  - test/unit/metrics.test.ts
137
130
  - test/unit/mro.test.ts
138
131
  - test/unit/orchestrator.test.ts
139
132
  - test/unit/parser-extract-cache.test.ts
140
133
  - test/unit/parser-loader.test.ts
134
+ - test/unit/pr-generator.test.ts
141
135
  - test/unit/registry.test.ts
142
136
  - test/unit/resolver.test.ts
143
137
  - test/unit/review.test.ts
138
+ - test/unit/risk.test.ts
144
139
  - test/unit/scanner.test.ts
145
140
  - test/unit/scope-resolver.test.ts
146
141
  - test/unit/security-rules.test.ts
147
142
  - test/unit/server-test-plan.test.ts
148
143
  - test/unit/skills.test.ts
149
- - test/unit/testplan.test.ts
150
144
  - test/unit/uninstall.test.ts
151
145
  - test/unit/utils.test.ts
152
146
  - test/unit/vectors.test.ts
153
147
  - test/unit/vue-import.test.ts
148
+ - test/unit/watcher.test.ts
@@ -44,7 +44,7 @@ Contains 10 symbols (3 exported) across 1 files.
44
44
  - **root**: `AnalysisStats`
45
45
 
46
46
  ## Used By
47
- - **analyzer**: `ProgressPhase`, `ProgressReporter`, `startPhase`, `tick`, `endPhase`, `done`, `finalize`
47
+ - **analyzer**: `ProgressPhase`, `ProgressReporter`, `startPhase`, `tick`, `endPhase`, `finalize`
48
48
  - **root**: `createProgressReporter`, `finalize`
49
49
 
50
50
  ## Files
package/README.md CHANGED
@@ -98,20 +98,29 @@ Then connect your editor:
98
98
  claude mcp add milens -- milens serve -p .
99
99
  ```
100
100
 
101
- Or in .mcp.json at plugin root:
101
+ Or drop this in `.mcp.json` at your project root (equivalent, works the same in the CLI, VS Code extension, and desktop app):
102
102
 
103
- ```bash
103
+ ```json
104
104
  {
105
105
  "mcpServers": {
106
106
  "milens": {
107
107
  "type": "stdio",
108
108
  "command": "milens",
109
- "args": ["serve", "-p", "${workspaceFolder}"]
109
+ "args": ["serve", "-p", "."]
110
110
  }
111
111
  }
112
112
  }
113
113
  ```
114
114
 
115
+ Or install as a plugin from the marketplace:
116
+
117
+ ```bash
118
+ /plugin marketplace add fuze210699/milens
119
+ /plugin install milens
120
+ ```
121
+
122
+ See [adapters/README.md](adapters/README.md#claude-code--via-plugin-install-marketplace) for how this avoids the workspace-root pitfall that broke earlier plugin builds.
123
+
115
124
  <details>
116
125
  <summary><b>More editors</b> — Cursor, OpenCode, Codex, Gemini, Zed</summary>
117
126
 
@@ -1,107 +1,144 @@
1
- # Milens Adapter Packs
2
-
3
- Ready-to-use configuration files for connecting milens MCP server to popular AI coding harnesses.
4
-
5
- ## What is milens?
6
-
7
- Milens is a code intelligence MCP server that provides deep symbol search, dependency graphs, blast-radius analysis, and pre-commit change detection. These adapter packs wire milens into your AI coding tool so it can answer questions like "what calls this function?" and "what breaks if I change this?"
8
-
9
- ## Available Adapters
10
-
11
- | Harness | Directory | What's included |
12
- |---|---|---|
13
- | **Claude Code** | `claude-code/` | `.claude/mcp.json` + `CLAUDE.md` |
14
- | **OpenCode** | `opencode/` | `.opencode/config.json` + `AGENTS.md` |
15
- | **Codex** | `codex/` | `.codex/codex.md` |
16
- | **Cursor** | `cursor/` | `.cursorrules` |
17
- | **GitHub Copilot** | `copilot/` | `.github/copilot-instructions.md` |
18
- | **Gemini** | `gemini/` | `.gemini/context.md` |
19
- | **Zed** | `zed/` | `.zed/settings.json` |
20
-
21
- ## Installation
22
-
23
- ### Claude Code
24
-
25
- ```bash
26
- cp -r adapters/claude-code/.claude .claude/
27
- cp adapters/claude-code/CLAUDE.md CLAUDE.md
28
- ```
29
-
30
- ### OpenCode
31
-
32
- ```bash
33
- cp -r adapters/opencode/.opencode .opencode/
34
- cp adapters/opencode/AGENTS.md AGENTS.md
35
- ```
36
-
37
- ### Codex
38
-
39
- ```bash
40
- cp -r adapters/codex/.codex .codex/
41
- ```
42
-
43
- ### Cursor
44
-
45
- ```bash
46
- cp adapters/cursor/.cursorrules .cursorrules
47
- ```
48
-
49
- ### GitHub Copilot
50
-
51
- ```bash
52
- cp -r adapters/copilot/.github .github/
53
- ```
54
-
55
- ### Gemini
56
-
57
- ```bash
58
- cp -r adapters/gemini/.gemini .gemini/
59
- ```
60
-
61
- ### Zed
62
-
63
- ```bash
64
- cp -r adapters/zed/.zed .zed/
65
- ```
66
-
67
- ## Verification
68
-
69
- After installation, verify milens is connected:
70
-
71
- 1. Start your AI harness
72
- 2. Look for the milens MCP server in the tools list
73
- 3. Run `mcp_milens_status` to confirm the index is healthy
74
-
75
- ## Index Maintenance
76
-
77
- After significant code changes, refresh the index:
78
-
79
- ```bash
80
- npx milens analyze -p . --force
81
- ```
82
-
83
- ## All Tools Available
84
-
85
- | Tool | Purpose |
86
- |---|---|
87
- | `mcp_milens_overview` | Combined context + impact + grep |
88
- | `mcp_milens_edit_check` | Pre-edit safety check |
89
- | `mcp_milens_impact` | Blast radius analysis |
90
- | `mcp_milens_context` | 360° caller/callee view |
91
- | `mcp_milens_query` | Symbol definitions by name |
92
- | `mcp_milens_grep` | Full-text search all files |
93
- | `mcp_milens_detect_changes` | Pre-commit change detection |
94
- | `mcp_milens_explain_relationship` | Shortest path between symbols |
95
- | `mcp_milens_get_file_symbols` | All symbols in a file |
96
- | `mcp_milens_get_type_hierarchy` | Class inheritance tree |
97
- | `mcp_milens_find_dead_code` | Unused exported symbols |
98
- | `mcp_milens_trace` | Execution flow tracing |
99
- | `mcp_milens_status` | Index health check |
100
-
101
- ## Safety Rules (applies to all harnesses)
102
-
103
- - Never edit a symbol without `mcp_milens_edit_check` first
104
- - Never delete/rename without `mcp_milens_grep` + `mcp_milens_impact`
105
- - Never commit without `mcp_milens_detect_changes`
106
- - Use `mcp_milens_grep` for phrases/UI text, `mcp_milens_query` for code symbols
107
- - All milens calls require `repo` set to the absolute workspace root
1
+ # Milens Adapter Packs
2
+
3
+ Ready-to-use configuration files for connecting milens MCP server to popular AI coding harnesses.
4
+
5
+ ## What is milens?
6
+
7
+ Milens is a code intelligence MCP server that provides deep symbol search, dependency graphs, blast-radius analysis, and pre-commit change detection. These adapter packs wire milens into your AI coding tool so it can answer questions like "what calls this function?" and "what breaks if I change this?"
8
+
9
+ ## Available Adapters
10
+
11
+ | Harness | Directory | What's included |
12
+ |---|---|---|
13
+ | **Claude Code** | `claude-code/` | `.claude/mcp.json` + `CLAUDE.md` (+ optional hooks snippet) |
14
+ | **OpenCode** | `opencode/` | `.opencode/config.json` + `AGENTS.md` |
15
+ | **Codex** | `codex/` | `.codex/config.toml` + `.codex/codex.md` |
16
+ | **Cursor** | `cursor/` | `.cursor/mcp.json` + `.cursorrules` |
17
+ | **GitHub Copilot** | `copilot/` | `.vscode/mcp.json` + `.github/copilot-instructions.md` |
18
+ | **Gemini** | `gemini/` | `.gemini/settings.json` + `.gemini/context.md` |
19
+ | **Zed** | `zed/` | `.zed/settings.json` |
20
+
21
+ ## Installation
22
+
23
+ ### Claude Code
24
+
25
+ Register milens as a **project-scoped MCP server** — this is the one method that works identically across the Claude Code CLI, the VS Code extension, and the desktop app, because it relies on nothing but a plain `.mcp.json` file at your project root (no plugin marketplace involved).
26
+
27
+ ```bash
28
+ cp -r adapters/claude-code/.claude .claude/
29
+ cp adapters/claude-code/CLAUDE.md CLAUDE.md
30
+ claude mcp add milens -- milens serve -p .
31
+ ```
32
+
33
+ That command writes a `.mcp.json` at your project root equivalent to:
34
+
35
+ ```json
36
+ {
37
+ "mcpServers": {
38
+ "milens": {
39
+ "command": "milens",
40
+ "args": ["serve", "-p", "."]
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ `-p .` is resolved against the process's working directory, which Claude Code always sets to your project root when it spawns the server — so this is the most portable form and needs no environment-variable substitution.
47
+
48
+ > **Prerequisite:** `npm i -g milens`
49
+
50
+ ### Claude Code — via `/plugin install` (marketplace)
51
+
52
+ ```bash
53
+ /plugin marketplace add fuze210699/milens
54
+ /plugin install milens
55
+ ```
56
+
57
+ This reads `.claude-plugin/marketplace.json` at the repo root, which points at `adapters/claude-code` as the plugin. That plugin ships its own `.mcp.json` with **no `-p` flag** — `milens serve` falls back to the `CLAUDE_PROJECT_DIR` environment variable, which Claude Code injects into every MCP server subprocess it spawns (project-scoped or plugin-scoped).
58
+
59
+ > **History:** we previously shipped a plugin manifest that passed `${CLAUDE_PLUGIN_ROOT}` as `-p`. That variable resolves to the *plugin's own install directory* (e.g. `~/.claude/plugins/cache/...`), not your project — so it silently indexed the wrong codebase. We removed it in favor of the manual `.mcp.json` method above.
60
+ >
61
+ > The current plugin fixes this by relying on `CLAUDE_PROJECT_DIR` (env var, not a `${...}` template substitution) read directly by the CLI — `resolve(opts.path ?? process.env.CLAUDE_PROJECT_DIR ?? '.')` in `src/cli.ts`. Claude Code's docs don't specify a minimum version for `CLAUDE_PROJECT_DIR` injection into plugin-scoped servers, so **verify with `mcp_milens_status` after install** — if the repo path looks wrong, fall back to the manual `.mcp.json` method above, which is unaffected by any of this and always works.
62
+
63
+ **Optional: session-start / pre-compact hooks.** Merge the `hooks` key from `adapters/claude-code/.claude/settings.json.hooks-snippet.json` into your project's `.claude/settings.json` (create the file if it doesn't exist yet). Not copied automatically since `.claude/settings.json` commonly holds other project settings you don't want overwritten.
64
+
65
+ ### OpenCode
66
+
67
+ ```bash
68
+ cp -r adapters/opencode/.opencode .opencode/
69
+ cp adapters/opencode/AGENTS.md AGENTS.md
70
+ ```
71
+
72
+ ### Codex
73
+
74
+ ```bash
75
+ cp -r adapters/codex/.codex .codex/
76
+ ```
77
+
78
+ ### Cursor
79
+
80
+ ```bash
81
+ cp -r adapters/cursor/.cursor .cursor/
82
+ cp adapters/cursor/.cursorrules .cursorrules
83
+ ```
84
+
85
+ ### GitHub Copilot
86
+
87
+ ```bash
88
+ cp -r adapters/copilot/.vscode .vscode/
89
+ cp -r adapters/copilot/.github .github/
90
+ ```
91
+
92
+ ### Gemini
93
+
94
+ ```bash
95
+ cp -r adapters/gemini/.gemini .gemini/
96
+ ```
97
+
98
+ ### Zed
99
+
100
+ ```bash
101
+ cp -r adapters/zed/.zed .zed/
102
+ ```
103
+
104
+ ## Verification
105
+
106
+ After installation, verify milens is connected:
107
+
108
+ 1. Start your AI harness
109
+ 2. Look for the milens MCP server in the tools list
110
+ 3. Run `mcp_milens_status` to confirm the index is healthy
111
+
112
+ ## Index Maintenance
113
+
114
+ After significant code changes, refresh the index:
115
+
116
+ ```bash
117
+ npx milens analyze -p . --force
118
+ ```
119
+
120
+ ## All Tools Available
121
+
122
+ | Tool | Purpose |
123
+ |---|---|
124
+ | `mcp_milens_overview` | Combined context + impact + grep |
125
+ | `mcp_milens_edit_check` | Pre-edit safety check |
126
+ | `mcp_milens_impact` | Blast radius analysis |
127
+ | `mcp_milens_context` | 360° caller/callee view |
128
+ | `mcp_milens_query` | Symbol definitions by name |
129
+ | `mcp_milens_grep` | Full-text search all files |
130
+ | `mcp_milens_detect_changes` | Pre-commit change detection |
131
+ | `mcp_milens_explain_relationship` | Shortest path between symbols |
132
+ | `mcp_milens_get_file_symbols` | All symbols in a file |
133
+ | `mcp_milens_get_type_hierarchy` | Class inheritance tree |
134
+ | `mcp_milens_find_dead_code` | Unused exported symbols |
135
+ | `mcp_milens_trace` | Execution flow tracing |
136
+ | `mcp_milens_status` | Index health check |
137
+
138
+ ## Safety Rules (applies to all harnesses)
139
+
140
+ - Never edit a symbol without `mcp_milens_edit_check` first
141
+ - Never delete/rename without `mcp_milens_grep` + `mcp_milens_impact`
142
+ - Never commit without `mcp_milens_detect_changes`
143
+ - Use `mcp_milens_grep` for phrases/UI text, `mcp_milens_query` for code symbols
144
+ - All milens calls require `repo` set to the absolute workspace root
@@ -0,0 +1,26 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "*",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "milens hooks session-start --repo ${CLAUDE_PROJECT_DIR} || true"
10
+ }
11
+ ]
12
+ }
13
+ ],
14
+ "PreCompact": [
15
+ {
16
+ "matcher": "*",
17
+ "hooks": [
18
+ {
19
+ "type": "command",
20
+ "command": "milens hooks pre-compact --repo ${CLAUDE_PROJECT_DIR} || true"
21
+ }
22
+ ]
23
+ }
24
+ ]
25
+ }
26
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "milens",
3
+ "description": "AI-DOS Code Intelligence Platform — knowledge graph, security scanning, impact analysis, and closed-loop AI development with 43 MCP tools",
4
+ "version": "0.7.1",
5
+ "author": {
6
+ "name": "milens"
7
+ },
8
+ "homepage": "https://github.com/fuze210699/milens",
9
+ "repository": "https://github.com/fuze210699/milens",
10
+ "license": "MIT"
11
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "mcpServers": {
3
+ "milens": {
4
+ "command": "milens",
5
+ "args": ["serve"],
6
+ "env": { "MILENS_PROFILE": "standard" }
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,3 @@
1
+ [mcp_servers.milens]
2
+ command = "milens"
3
+ args = ["serve", "-p", "."]
@@ -0,0 +1,10 @@
1
+ {
2
+ "servers": {
3
+ "milens": {
4
+ "type": "stdio",
5
+ "command": "milens",
6
+ "args": ["serve", "-p", "${workspaceFolder}"],
7
+ "env": { "MILENS_PROFILE": "standard" }
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "mcpServers": {
3
+ "milens": {
4
+ "command": "milens",
5
+ "args": ["serve", "-p", "${workspaceFolder}"],
6
+ "env": { "MILENS_PROFILE": "standard" }
7
+ }
8
+ }
9
+ }