milens 0.6.4 → 0.6.6

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 (130) hide show
  1. package/.agents/skills/adapters/SKILL.md +20 -0
  2. package/.agents/skills/analyzer/SKILL.md +38 -16
  3. package/.agents/skills/apps/SKILL.md +25 -1
  4. package/.agents/skills/docs/SKILL.md +33 -5
  5. package/.agents/skills/milens/SKILL.md +36 -6
  6. package/.agents/skills/milens-architect/SKILL.md +128 -0
  7. package/.agents/skills/milens-debugger/SKILL.md +141 -0
  8. package/.agents/skills/orchestrator/SKILL.md +59 -0
  9. package/.agents/skills/parser/SKILL.md +35 -14
  10. package/.agents/skills/root/SKILL.md +39 -17
  11. package/.agents/skills/scripts/SKILL.md +21 -3
  12. package/.agents/skills/security/SKILL.md +32 -11
  13. package/.agents/skills/server/SKILL.md +47 -20
  14. package/.agents/skills/store/SKILL.md +40 -18
  15. package/.agents/skills/test/SKILL.md +57 -9
  16. package/LICENSE +21 -75
  17. package/README.md +294 -467
  18. package/adapters/claude-code/CLAUDE.md +36 -15
  19. package/adapters/codex/.codex/codex.md +38 -23
  20. package/adapters/copilot/.github/copilot-instructions.md +29 -22
  21. package/adapters/gemini/.gemini/context.md +33 -10
  22. package/adapters/opencode/AGENTS.md +36 -15
  23. package/dist/agents-md.d.ts.map +1 -1
  24. package/dist/agents-md.js +56 -5
  25. package/dist/agents-md.js.map +1 -1
  26. package/dist/analyzer/engine.d.ts +4 -0
  27. package/dist/analyzer/engine.d.ts.map +1 -1
  28. package/dist/analyzer/engine.js +378 -14
  29. package/dist/analyzer/engine.js.map +1 -1
  30. package/dist/analyzer/resolver.d.ts +2 -0
  31. package/dist/analyzer/resolver.d.ts.map +1 -1
  32. package/dist/analyzer/resolver.js +187 -9
  33. package/dist/analyzer/resolver.js.map +1 -1
  34. package/dist/analyzer/review.d.ts.map +1 -1
  35. package/dist/analyzer/review.js +254 -32
  36. package/dist/analyzer/review.js.map +1 -1
  37. package/dist/analyzer/scope-resolver.d.ts +42 -0
  38. package/dist/analyzer/scope-resolver.d.ts.map +1 -0
  39. package/dist/analyzer/scope-resolver.js +687 -0
  40. package/dist/analyzer/scope-resolver.js.map +1 -0
  41. package/dist/cli.js +590 -20
  42. package/dist/cli.js.map +1 -1
  43. package/dist/orchestrator/orchestrator.d.ts +65 -0
  44. package/dist/orchestrator/orchestrator.d.ts.map +1 -0
  45. package/dist/orchestrator/orchestrator.js +178 -0
  46. package/dist/orchestrator/orchestrator.js.map +1 -0
  47. package/dist/orchestrator/reporter.d.ts +15 -0
  48. package/dist/orchestrator/reporter.d.ts.map +1 -0
  49. package/dist/orchestrator/reporter.js +38 -0
  50. package/dist/orchestrator/reporter.js.map +1 -0
  51. package/dist/parser/extract.d.ts +6 -1
  52. package/dist/parser/extract.d.ts.map +1 -1
  53. package/dist/parser/extract.js +14 -2
  54. package/dist/parser/extract.js.map +1 -1
  55. package/dist/parser/lang-css.d.ts.map +1 -1
  56. package/dist/parser/lang-css.js +7 -1
  57. package/dist/parser/lang-css.js.map +1 -1
  58. package/dist/parser/lang-go.d.ts.map +1 -1
  59. package/dist/parser/lang-go.js +16 -0
  60. package/dist/parser/lang-go.js.map +1 -1
  61. package/dist/parser/lang-html.d.ts +4 -0
  62. package/dist/parser/lang-html.d.ts.map +1 -1
  63. package/dist/parser/lang-html.js +40 -1
  64. package/dist/parser/lang-html.js.map +1 -1
  65. package/dist/parser/lang-java.d.ts.map +1 -1
  66. package/dist/parser/lang-java.js +12 -0
  67. package/dist/parser/lang-java.js.map +1 -1
  68. package/dist/parser/lang-js.d.ts.map +1 -1
  69. package/dist/parser/lang-js.js +3 -0
  70. package/dist/parser/lang-js.js.map +1 -1
  71. package/dist/parser/lang-php.d.ts.map +1 -1
  72. package/dist/parser/lang-php.js +11 -0
  73. package/dist/parser/lang-php.js.map +1 -1
  74. package/dist/parser/lang-py.d.ts.map +1 -1
  75. package/dist/parser/lang-py.js +14 -0
  76. package/dist/parser/lang-py.js.map +1 -1
  77. package/dist/parser/lang-ruby.d.ts.map +1 -1
  78. package/dist/parser/lang-ruby.js +20 -0
  79. package/dist/parser/lang-ruby.js.map +1 -1
  80. package/dist/parser/lang-rust.d.ts.map +1 -1
  81. package/dist/parser/lang-rust.js +27 -4
  82. package/dist/parser/lang-rust.js.map +1 -1
  83. package/dist/parser/lang-ts.d.ts.map +1 -1
  84. package/dist/parser/lang-ts.js +3 -0
  85. package/dist/parser/lang-ts.js.map +1 -1
  86. package/dist/parser/lang-vue.d.ts +17 -1
  87. package/dist/parser/lang-vue.d.ts.map +1 -1
  88. package/dist/parser/lang-vue.js +177 -0
  89. package/dist/parser/lang-vue.js.map +1 -1
  90. package/dist/parser/language-provider.d.ts +27 -0
  91. package/dist/parser/language-provider.d.ts.map +1 -0
  92. package/dist/parser/language-provider.js +2 -0
  93. package/dist/parser/language-provider.js.map +1 -0
  94. package/dist/security/rules.d.ts.map +1 -1
  95. package/dist/security/rules.js +4 -1
  96. package/dist/security/rules.js.map +1 -1
  97. package/dist/server/hooks.d.ts +3 -0
  98. package/dist/server/hooks.d.ts.map +1 -1
  99. package/dist/server/hooks.js +79 -0
  100. package/dist/server/hooks.js.map +1 -1
  101. package/dist/server/mcp-prompts.d.ts.map +1 -1
  102. package/dist/server/mcp-prompts.js +1 -1
  103. package/dist/server/mcp-prompts.js.map +1 -1
  104. package/dist/server/mcp.d.ts.map +1 -1
  105. package/dist/server/mcp.js +638 -61
  106. package/dist/server/mcp.js.map +1 -1
  107. package/dist/server/watcher.d.ts +47 -0
  108. package/dist/server/watcher.d.ts.map +1 -0
  109. package/dist/server/watcher.js +136 -0
  110. package/dist/server/watcher.js.map +1 -0
  111. package/dist/skills.js +201 -36
  112. package/dist/skills.js.map +1 -1
  113. package/dist/store/annotations.d.ts.map +1 -1
  114. package/dist/store/annotations.js +18 -15
  115. package/dist/store/annotations.js.map +1 -1
  116. package/dist/store/confidence.d.ts +10 -0
  117. package/dist/store/confidence.d.ts.map +1 -1
  118. package/dist/store/confidence.js +28 -1
  119. package/dist/store/confidence.js.map +1 -1
  120. package/dist/store/db.d.ts +16 -0
  121. package/dist/store/db.d.ts.map +1 -1
  122. package/dist/store/db.js +121 -7
  123. package/dist/store/db.js.map +1 -1
  124. package/dist/store/schema.sql +25 -10
  125. package/dist/uninstall.d.ts +54 -0
  126. package/dist/uninstall.d.ts.map +1 -0
  127. package/dist/uninstall.js +795 -0
  128. package/dist/uninstall.js.map +1 -0
  129. package/docs/README.md +7 -6
  130. package/package.json +4 -3
@@ -5,42 +5,63 @@ description: Code intelligence for the parser area — symbols, dependencies, an
5
5
 
6
6
  # Parser
7
7
 
8
+ ## Working with this area
9
+ When working with code in **parser/**, follow these mandatory safety rules:
10
+
11
+ ### Before editing any symbol in this area:
12
+ 1. Call `mcp_milens_impact({target: "<symbol>", repo: "<workspaceRoot>"})` — check blast radius
13
+ 2. If depth-1 dependents > 5 → **STOP and warn** before proceeding
14
+ 3. Call `mcp_milens_context({name: "<symbol>", repo: "<workspaceRoot>"})` — see all callers/callees
15
+
16
+ ### Before committing changes in this area:
17
+ 1. Call `mcp_milens_detect_changes({repo: "<workspaceRoot>"})` — verify scope
18
+ 2. If unexpected files changed → **STOP and report**
19
+
20
+ ### Key tools for this area:
21
+ | Task | Tool |
22
+ |---|---|
23
+ | Find all references | `mcp_milens_context` |
24
+ | Check edit safety | `mcp_milens_edit_check` |
25
+ | Text search across files | `mcp_milens_grep` |
26
+ | See file symbols | `mcp_milens_get_file_symbols` |
27
+
8
28
  ## Overview
9
29
  Contains 76 symbols (26 exported) across 15 files.
10
30
 
11
31
  ## Key Symbols
12
32
  - **`LangSpec`** [interface] (src/parser/extract.ts:6) — 30 refs
13
- - **`loadLanguage`** [function] (src/parser/loader.ts:21) — 10 refs
14
- - **`getParser`** [function] (src/parser/loader.ts:32) — 9 refs
15
- - **`extractFromTree`** [function] (src/parser/extract.ts:250) — 6 refs
33
+ - **`loadLanguage`** [function] (src/parser/loader.ts:21) — 14 refs
34
+ - **`getParser`** [function] (src/parser/loader.ts:32) — 13 refs
35
+ - **`extractFromTree`** [function] (src/parser/extract.ts:250) — 8 refs
36
+ - **`supportedExtensions`** [function] (src/parser/languages.ts:29) — 6 refs
16
37
  - **`extractHtmlScripts`** [function] (src/parser/lang-html.ts:33) — 5 refs
17
38
  - **`extractMarkdown`** [function] (src/parser/lang-md.ts:34) — 5 refs
39
+ - **`spec`** [variable] (src/parser/lang-ts.ts:5) — 5 refs
18
40
  - **`extractVueScript`** [function] (src/parser/lang-vue.ts:18) — 5 refs
41
+ - **`initTreeSitter`** [function] (src/parser/loader.ts:15) — 5 refs
42
+ - **`clearQueryCache`** [function] (src/parser/extract.ts:67) — 4 refs
19
43
  - **`extractHtmlRefs`** [function] (src/parser/lang-html.ts:52) — 4 refs
20
44
  - **`extractVueTemplateRefs`** [function] (src/parser/lang-vue.ts:37) — 4 refs
45
+ - **`langForFile`** [function] (src/parser/languages.ts:24) — 4 refs
21
46
  - **`spec`** [variable] (src/parser/lang-js.ts:5) — 3 refs
22
- - **`spec`** [variable] (src/parser/lang-ts.ts:5) — 3 refs
23
- - **`clearQueryCache`** [function] (src/parser/extract.ts:67) — 2 refs
24
- - **`spec`** [variable] (src/parser/lang-css.ts:5) — 2 refs
25
- - **`spec`** [variable] (src/parser/lang-go.ts:5) — 2 refs
26
- - **`spec`** [variable] (src/parser/lang-py.ts:5) — 2 refs
27
47
 
28
48
  ## Entry Points
29
49
  - **`LangSpec`** [interface] — 30 incoming references
30
- - **`loadLanguage`** [function] — 10 incoming references
31
- - **`getParser`** [function] — 9 incoming references
32
- - **`extractFromTree`** [function] — 6 incoming references
33
- - **`extractHtmlScripts`** [function] — 5 incoming references
50
+ - **`loadLanguage`** [function] — 14 incoming references
51
+ - **`getParser`** [function] — 13 incoming references
52
+ - **`extractFromTree`** [function] — 8 incoming references
53
+ - **`supportedExtensions`** [function] — 6 incoming references
34
54
 
35
55
  ## Dependencies
36
56
  - **root**: `CodeSymbol`, `RawImport`, `RawCall`, `RawHeritage`, `RawReExport`, `RawTypeBinding`, `RawAssignmentBinding`, `RawReturnType` (+4 more)
57
+ - **test**: `lang`, `parser`
37
58
  - **analyzer**: `find`, `resolve`
38
59
  - **store**: `load`
39
60
 
40
61
  ## Used By
41
- - **analyzer**: `langForFile`, `getParser`, `loadLanguage`, `extractFromTree`, `clearQueryCache`, `extractVueScript`, `extractVueTemplateRefs`, `extractHtmlScripts` (+6 more)
62
+ - **analyzer**: `langForFile`, `supportedExtensions`, `getParser`, `loadLanguage`, `extractFromTree`, `clearQueryCache`, `extractVueScript`, `extractVueTemplateRefs` (+6 more)
42
63
  - **server**: `getParser`, `loadLanguage`, `ALL_LANGS`
43
- - **test**: `getParser`, `loadLanguage`, `extractFromTree`, `extractVueScript`, `extractVueTemplateRefs`, `spec`, `extractHtmlScripts`, `extractHtmlRefs` (+2 more)
64
+ - **test**: `getParser`, `loadLanguage`, `extractFromTree`, `extractVueScript`, `extractVueTemplateRefs`, `spec`, `extractHtmlScripts`, `extractHtmlRefs` (+7 more)
44
65
 
45
66
  ## Files
46
67
  - src/parser/extract.ts
@@ -5,45 +5,68 @@ description: Code intelligence for the root area — symbols, dependencies, and
5
5
 
6
6
  # Root
7
7
 
8
+ ## Working with this area
9
+ When working with code in **root/**, follow these mandatory safety rules:
10
+
11
+ ### Before editing any symbol in this area:
12
+ 1. Call `mcp_milens_impact({target: "<symbol>", repo: "<workspaceRoot>"})` — check blast radius
13
+ 2. If depth-1 dependents > 5 → **STOP and warn** before proceeding
14
+ 3. Call `mcp_milens_context({name: "<symbol>", repo: "<workspaceRoot>"})` — see all callers/callees
15
+
16
+ ### Before committing changes in this area:
17
+ 1. Call `mcp_milens_detect_changes({repo: "<workspaceRoot>"})` — verify scope
18
+ 2. If unexpected files changed → **STOP and report**
19
+
20
+ ### Key tools for this area:
21
+ | Task | Tool |
22
+ |---|---|
23
+ | Find all references | `mcp_milens_context` |
24
+ | Check edit safety | `mcp_milens_edit_check` |
25
+ | Text search across files | `mcp_milens_grep` |
26
+ | See file symbols | `mcp_milens_get_file_symbols` |
27
+
8
28
  ## Overview
9
- Contains 257 symbols (206 exported) across 14 files.
29
+ Contains 204 symbols (153 exported) across 13 files.
10
30
 
11
31
  ## Key Symbols
12
- - **`CodeSymbol`** [interface] (src/types.ts:8) — 30 refs
13
- - **`SymbolLink`** [interface] (src/types.ts:26) — 13 refs
14
- - **`isTestFile`** [function] (src/utils.ts:2) — 9 refs
32
+ - **`CodeSymbol`** [interface] (src/types.ts:8) — 41 refs
33
+ - **`SymbolLink`** [interface] (src/types.ts:26) — 21 refs
34
+ - **`isTestFile`** [function] (src/utils.ts:2) — 11 refs
15
35
  - **`RawCall`** [interface] (src/types.ts:44) — 7 refs
16
36
  - **`RawImport`** [interface] (src/types.ts:35) — 6 refs
17
37
  - **`ExtractionResult`** [interface] (src/types.ts:60) — 6 refs
38
+ - **`generateAgentsMd`** [function] (src/agents-md.ts:43) — 4 refs
39
+ - **`computeMetrics`** [function] (src/metrics.ts:21) — 4 refs
40
+ - **`formatMetricsReport`** [function] (src/metrics.ts:62) — 4 refs
41
+ - **`MilensMetrics`** [interface] (src/metrics.ts:4) — 4 refs
42
+ - **`generateSkills`** [function] (src/skills.ts:19) — 4 refs
18
43
  - **`RawHeritage`** [interface] (src/types.ts:52) — 4 refs
19
44
  - **`RawTypeBinding`** [interface] (src/types.ts:80) — 4 refs
20
45
  - **`RawAssignmentBinding`** [interface] (src/types.ts:88) — 4 refs
21
46
  - **`RawReturnType`** [interface] (src/types.ts:96) — 4 refs
22
- - **`RawCallResultBinding`** [interface] (src/types.ts:104) — 4 refs
23
- - **`RawReExport`** [interface] (src/types.ts:73) — 3 refs
24
- - **`Annotation`** [interface] (src/types.ts:138) — 3 refs
25
- - **`generateAgentsMd`** [function] (src/agents-md.ts:43) — 2 refs
26
- - **`computeMetrics`** [function] (src/metrics.ts:21) — 2 refs
27
47
 
28
48
  ## Entry Points
29
- - **`CodeSymbol`** [interface] — 30 incoming references
30
- - **`has`** [function] — 26 incoming references
31
- - **`SymbolLink`** [interface] — 13 incoming references
32
- - **`isTestFile`** [function] — 9 incoming references
49
+ - **`CodeSymbol`** [interface] — 41 incoming references
50
+ - **`has`** [function] — 30 incoming references
51
+ - **`SymbolLink`** [interface] — 21 incoming references
52
+ - **`isTestFile`** [function] — 11 incoming references
33
53
  - **`RawCall`** [interface] — 7 incoming references
34
54
 
35
55
  ## Dependencies
36
- - **store**: `Database`, `RepoRegistry`, `AnnotationStore`, `runDecayPass`, `getIncomingLinks`, `getAllSymbols`, `getCodebaseSummary`, `register` (+23 more)
56
+ - **store**: `Database`, `RepoRegistry`, `AnnotationStore`, `runDecayPass`, `getIncomingLinks`, `getAllSymbols`, `getCodebaseSummary`, `register` (+25 more)
37
57
  - **analyzer**: `loadAliases`, `analyze`, `resolve`, `clear`
38
58
  - **server**: `startHttp`, `startStdio`, `HookManager`, `get`, `enableHook`, `loadConfig`, `saveConfig`, `disableHook`
39
59
  - **security**: `loadRules`, `auditDependencies`
60
+ - **orchestrator**: `Orchestrator`, `subscribe`, `runAndFormat`
40
61
  - **scripts**: `outDir`
62
+ - **test**: `dbPath`
41
63
 
42
64
  ## Used By
43
65
  - **analyzer**: `isTestFile`, `CodeSymbol`, `ExtractionResult`, `RawImport`, `RawCall`, `RawHeritage`, `RawReExport`, `RawTypeBinding` (+8 more)
66
+ - **orchestrator**: `CodeSymbol`, `has`
44
67
  - **parser**: `CodeSymbol`, `RawImport`, `RawCall`, `RawHeritage`, `RawReExport`, `RawTypeBinding`, `RawAssignmentBinding`, `RawReturnType` (+4 more)
45
68
  - **store**: `Annotation`, `AnnotationKey`, `Session`, `EvolutionEvent`, `CodeSymbol`, `SymbolLink`, `RepoEntry`, `has` (+1 more)
46
- - **test**: `CodeSymbol`, `SymbolLink`, `RawImport`, `RawCall`, `RawHeritage`, `RawTypeBinding`, `RawAssignmentBinding`, `RawReturnType` (+2 more)
69
+ - **test**: `generateAgentsMd`, `AnnotationKey`, `CodeSymbol`, `SymbolLink`, `computeMetrics`, `formatMetricsReport`, `MilensMetrics`, `RawImport` (+9 more)
47
70
  - **security**: `has`
48
71
  - **server**: `has`
49
72
 
@@ -53,8 +76,7 @@ Contains 257 symbols (206 exported) across 14 files.
53
76
  - CONTRIBUTING.md
54
77
  - DEPLOY.md
55
78
  - README.md
56
- - TODO.md
57
- - TODO2.md
79
+ - milens-upgrade.md
58
80
  - src/agents-md.ts
59
81
  - src/cli.ts
60
82
  - src/metrics.ts
@@ -5,14 +5,34 @@ description: Code intelligence for the scripts area — symbols, dependencies, a
5
5
 
6
6
  # Scripts
7
7
 
8
+ ## Working with this area
9
+ When working with code in **scripts/**, follow these mandatory safety rules:
10
+
11
+ ### Before editing any symbol in this area:
12
+ 1. Call `mcp_milens_impact({target: "<symbol>", repo: "<workspaceRoot>"})` — check blast radius
13
+ 2. If depth-1 dependents > 5 → **STOP and warn** before proceeding
14
+ 3. Call `mcp_milens_context({name: "<symbol>", repo: "<workspaceRoot>"})` — see all callers/callees
15
+
16
+ ### Before committing changes in this area:
17
+ 1. Call `mcp_milens_detect_changes({repo: "<workspaceRoot>"})` — verify scope
18
+ 2. If unexpected files changed → **STOP and report**
19
+
20
+ ### Key tools for this area:
21
+ | Task | Tool |
22
+ |---|---|
23
+ | Find all references | `mcp_milens_context` |
24
+ | Check edit safety | `mcp_milens_edit_check` |
25
+ | Text search across files | `mcp_milens_grep` |
26
+ | See file symbols | `mcp_milens_get_file_symbols` |
27
+
8
28
  ## Overview
9
29
  Contains 29 symbols (0 exported) across 1 files.
10
30
 
11
31
  ## Entry Points
12
- - **`run`** [function] — 22 incoming references
13
32
  - **`ROOT`** [variable] — 2 incoming references
14
33
  - **`outDir`** [variable] — 2 incoming references
15
34
  - **`resolveTargets`** [function] — 1 incoming references
35
+ - **`run`** [function] — 1 incoming references
16
36
  - **`__dirname`** [variable] — 1 incoming references
17
37
 
18
38
  ## Dependencies
@@ -20,8 +40,6 @@ Contains 29 symbols (0 exported) across 1 files.
20
40
 
21
41
  ## Used By
22
42
  - **root**: `outDir`
23
- - **store**: `run`
24
- - **test**: `run`
25
43
 
26
44
  ## Files
27
45
  - scripts/build-standalone.mjs
@@ -5,32 +5,52 @@ description: Code intelligence for the security area — symbols, dependencies,
5
5
 
6
6
  # Security
7
7
 
8
+ ## Working with this area
9
+ When working with code in **security/**, follow these mandatory safety rules:
10
+
11
+ ### Before editing any symbol in this area:
12
+ 1. Call `mcp_milens_impact({target: "<symbol>", repo: "<workspaceRoot>"})` — check blast radius
13
+ 2. If depth-1 dependents > 5 → **STOP and warn** before proceeding
14
+ 3. Call `mcp_milens_context({name: "<symbol>", repo: "<workspaceRoot>"})` — see all callers/callees
15
+
16
+ ### Before committing changes in this area:
17
+ 1. Call `mcp_milens_detect_changes({repo: "<workspaceRoot>"})` — verify scope
18
+ 2. If unexpected files changed → **STOP and report**
19
+
20
+ ### Key tools for this area:
21
+ | Task | Tool |
22
+ |---|---|
23
+ | Find all references | `mcp_milens_context` |
24
+ | Check edit safety | `mcp_milens_edit_check` |
25
+ | Text search across files | `mcp_milens_grep` |
26
+ | See file symbols | `mcp_milens_get_file_symbols` |
27
+
8
28
  ## Overview
9
29
  Contains 35 symbols (15 exported) across 2 files.
10
30
 
11
31
  ## Key Symbols
12
- - **`loadRules`** [function] (src/security/rules.ts:1044) — 4 refs
32
+ - **`loadRules`** [function] (src/security/rules.ts:1044) — 6 refs
33
+ - **`auditDependencies`** [function] (src/security/deps.ts:732) — 4 refs
34
+ - **`detectEcosystem`** [function] (src/security/deps.ts:512) — 3 refs
35
+ - **`parseDependencies`** [function] (src/security/deps.ts:524) — 3 refs
36
+ - **`checkVulnerabilities`** [function] (src/security/deps.ts:687) — 3 refs
13
37
  - **`Ecosystem`** [type] (src/security/deps.ts:8) — 3 refs
14
- - **`auditDependencies`** [function] (src/security/deps.ts:732) — 2 refs
15
38
  - **`VulnerabilityReport`** [interface] (src/security/deps.ts:26) — 2 refs
16
- - **`detectEcosystem`** [function] (src/security/deps.ts:512) — 1 refs
17
- - **`parseDependencies`** [function] (src/security/deps.ts:524) — 1 refs
18
- - **`checkVulnerabilities`** [function] (src/security/deps.ts:687) — 1 refs
39
+ - **`getRulesByCategory`** [function] (src/security/rules.ts:1051) — 2 refs
40
+ - **`getRulesBySeverity`** [function] (src/security/rules.ts:1055) — 2 refs
19
41
  - **`SecurityCategory`** [type] (src/security/rules.ts:3) — 1 refs
20
42
  - **`Dependency`** [interface] (src/security/deps.ts:10) — 0 refs
21
43
  - **`Vulnerability`** [interface] (src/security/deps.ts:16) — 0 refs
22
- - **`getRulesByCategory`** [function] (src/security/rules.ts:1048) — 0 refs
23
- - **`getRulesBySeverity`** [function] (src/security/rules.ts:1052) — 0 refs
24
44
  - **`SecurityRule`** [interface] (src/security/rules.ts:14) — 0 refs
25
45
  - **`SecurityMatch`** [interface] (src/security/rules.ts:29) — 0 refs
26
46
  - **`SecurityReport`** [interface] (src/security/rules.ts:41) — 0 refs
27
47
 
28
48
  ## Entry Points
29
49
  - **`readManifest`** [function] — 6 incoming references
30
- - **`loadRules`** [function] — 4 incoming references
31
- - **`Ecosystem`** [type] — 3 incoming references
32
- - **`manifestExists`** [function] — 2 incoming references
33
- - **`parseSemver`** [function] — 2 incoming references
50
+ - **`loadRules`** [function] — 6 incoming references
51
+ - **`auditDependencies`** [function] — 4 incoming references
52
+ - **`detectEcosystem`** [function] — 3 incoming references
53
+ - **`parseDependencies`** [function] — 3 incoming references
34
54
 
35
55
  ## Dependencies
36
56
  - **root**: `has`
@@ -38,6 +58,7 @@ Contains 35 symbols (15 exported) across 2 files.
38
58
  ## Used By
39
59
  - **root**: `loadRules`, `auditDependencies`
40
60
  - **server**: `loadRules`
61
+ - **test**: `detectEcosystem`, `parseDependencies`, `checkVulnerabilities`, `auditDependencies`, `loadRules`, `getRulesByCategory`, `getRulesBySeverity`
41
62
 
42
63
  ## Files
43
64
  - src/security/deps.ts
@@ -5,42 +5,69 @@ description: Code intelligence for the server area — symbols, dependencies, an
5
5
 
6
6
  # Server
7
7
 
8
+ ## Working with this area
9
+ When working with code in **server/**, follow these mandatory safety rules:
10
+
11
+ ### Before editing any symbol in this area:
12
+ 1. Call `mcp_milens_impact({target: "<symbol>", repo: "<workspaceRoot>"})` — check blast radius
13
+ 2. If depth-1 dependents > 5 → **STOP and warn** before proceeding
14
+ 3. Call `mcp_milens_context({name: "<symbol>", repo: "<workspaceRoot>"})` — see all callers/callees
15
+
16
+ ### Before committing changes in this area:
17
+ 1. Call `mcp_milens_detect_changes({repo: "<workspaceRoot>"})` — verify scope
18
+ 2. If unexpected files changed → **STOP and report**
19
+
20
+ ### Key tools for this area:
21
+ | Task | Tool |
22
+ |---|---|
23
+ | Find all references | `mcp_milens_context` |
24
+ | Check edit safety | `mcp_milens_edit_check` |
25
+ | Text search across files | `mcp_milens_grep` |
26
+ | See file symbols | `mcp_milens_get_file_symbols` |
27
+
8
28
  ## Overview
9
- Contains 74 symbols (12 exported) across 4 files.
29
+ Contains 94 symbols (16 exported) across 5 files.
10
30
 
11
31
  ## Key Symbols
12
- - **`HookConfig`** [interface] (src/server/hooks.ts:5) — 3 refs
13
- - **`HookManager`** [class] (src/server/hooks.ts:43) — 2 refs
14
- - **`SessionContext`** [interface] (src/server/hooks.ts:15) — 2 refs
15
- - **`registerAllPrompts`** [function] (src/server/mcp-prompts.ts:637) — 2 refs
16
- - **`createMcpServer`** [function] (src/server/mcp.ts:367) — 2 refs
17
- - **`startStdio`** [function] (src/server/mcp.ts:2289) — 2 refs
18
- - **`startHttp`** [function] (src/server/mcp.ts:2297) — 2 refs
19
- - **`generateTestPlan`** [function] (src/server/test-plan.ts:14) — 2 refs
20
- - **`defaultOnSessionStart`** [function] (src/server/hooks.ts:100) — 0 refs
21
- - **`defaultOnSessionEnd`** [function] (src/server/hooks.ts:164) — 0 refs
22
- - **`defaultOnPreCommit`** [function] (src/server/hooks.ts:227) — 0 refs
23
- - **`TestPlan`** [interface] (src/server/test-plan.ts:3) — 0 refs
32
+ - **`HookManager`** [class] (src/server/hooks.ts:43) — 8 refs
33
+ - **`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:164) — 4 refs
36
+ - **`defaultOnPreCommit`** [function] (src/server/hooks.ts:227) — 4 refs
37
+ - **`defaultOnFileChange`** [function] (src/server/hooks.ts:313) — 4 refs
38
+ - **`defaultOnPreCompact`** [function] (src/server/hooks.ts:340) — 4 refs
39
+ - **`defaultOnPostCompact`** [function] (src/server/hooks.ts:358) — 4 refs
40
+ - **`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:370) — 4 refs
43
+ - **`generateTestPlan`** [function] (src/server/test-plan.ts:14) — 4 refs
44
+ - **`FileWatcher`** [class] (src/server/watcher.ts:50) — 3 refs
45
+ - **`startStdio`** [function] (src/server/mcp.ts:2717) — 2 refs
46
+ - **`startHttp`** [function] (src/server/mcp.ts:2756) — 2 refs
24
47
 
25
48
  ## Entry Points
26
- - **`get`** [method] — 8 incoming references
27
- - **`loadConfig`** [method] — 3 incoming references
28
- - **`saveConfig`** [method] — 3 incoming references
29
- - **`HookConfig`** [interface] — 3 incoming references
30
- - **`HookManager`** [class] — 2 incoming references
49
+ - **`get`** [method] — 9 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
31
54
 
32
55
  ## Dependencies
33
- - **store**: `Database`, `AnnotationStore`, `RepoRegistry`, `getCodebaseSummary`, `recall`, `close`, `getStats`, `getTestCoverage` (+33 more)
34
- - **analyzer**: `reviewPr`, `resolve`, `find`
56
+ - **store**: `Database`, `AnnotationStore`, `RepoRegistry`, `runDecayPass`, `getCodebaseSummary`, `recall`, `close`, `getStats` (+37 more)
57
+ - **analyzer**: `reviewPr`, `analyze`, `resolve`, `find`, `clear`
35
58
  - **parser**: `getParser`, `loadLanguage`, `ALL_LANGS`
36
59
  - **security**: `loadRules`
60
+ - **orchestrator**: `Orchestrator`, `snapshot`, `compare`, `runAndFormat`
37
61
  - **root**: `has`
62
+ - **test**: `dbPath`
38
63
 
39
64
  ## Used By
40
65
  - **root**: `startHttp`, `startStdio`, `HookManager`, `get`, `enableHook`, `loadConfig`, `saveConfig`, `disableHook`
66
+ - **test**: `HookManager`, `HookConfig`, `defaultOnSessionStart`, `defaultOnSessionEnd`, `defaultOnPreCommit`, `defaultOnFileChange`, `defaultOnPreCompact`, `defaultOnPostCompact` (+10 more)
41
67
 
42
68
  ## Files
43
69
  - src/server/hooks.ts
44
70
  - src/server/mcp-prompts.ts
45
71
  - src/server/mcp.ts
46
72
  - src/server/test-plan.ts
73
+ - src/server/watcher.ts
@@ -5,42 +5,64 @@ description: Code intelligence for the store area — symbols, dependencies, and
5
5
 
6
6
  # Store
7
7
 
8
+ ## Working with this area
9
+ When working with code in **store/**, follow these mandatory safety rules:
10
+
11
+ ### Before editing any symbol in this area:
12
+ 1. Call `mcp_milens_impact({target: "<symbol>", repo: "<workspaceRoot>"})` — check blast radius
13
+ 2. If depth-1 dependents > 5 → **STOP and warn** before proceeding
14
+ 3. Call `mcp_milens_context({name: "<symbol>", repo: "<workspaceRoot>"})` — see all callers/callees
15
+
16
+ ### Before committing changes in this area:
17
+ 1. Call `mcp_milens_detect_changes({repo: "<workspaceRoot>"})` — verify scope
18
+ 2. If unexpected files changed → **STOP and report**
19
+
20
+ ### Key tools for this area:
21
+ | Task | Tool |
22
+ |---|---|
23
+ | Find all references | `mcp_milens_context` |
24
+ | Check edit safety | `mcp_milens_edit_check` |
25
+ | Text search across files | `mcp_milens_grep` |
26
+ | See file symbols | `mcp_milens_get_file_symbols` |
27
+
8
28
  ## Overview
9
- Contains 128 symbols (14 exported) across 5 files.
29
+ Contains 135 symbols (15 exported) across 5 files.
10
30
 
11
31
  ## Key Symbols
12
- - **`Database`** [class] (src/store/db.ts:10) — 42 refs
13
- - **`AnnotationStore`** [class] (src/store/annotations.ts:10) — 14 refs
14
- - **`RepoRegistry`** [class] (src/store/registry.ts:18) — 6 refs
32
+ - **`Database`** [class] (src/store/db.ts:10) — 77 refs
33
+ - **`AnnotationStore`** [class] (src/store/annotations.ts:10) — 19 refs
34
+ - **`RepoRegistry`** [class] (src/store/registry.ts:18) — 13 refs
35
+ - **`runDecayPass`** [function] (src/store/confidence.ts:85) — 6 refs
15
36
  - **`buildEmbeddingText`** [function] (src/store/vectors.ts:250) — 4 refs
16
37
  - **`TfIdfProvider`** [class] (src/store/vectors.ts:44) — 4 refs
17
38
  - **`EmbeddingStore`** [class] (src/store/vectors.ts:170) — 4 refs
18
- - **`runDecayPass`** [function] (src/store/confidence.ts:84) — 2 refs
39
+ - **`decayConfidence`** [function] (src/store/confidence.ts:22) — 3 refs
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
19
44
  - **`EmbeddingProvider`** [interface] (src/store/vectors.ts:15) — 2 refs
20
- - **`decayConfidence`** [function] (src/store/confidence.ts:21) — 1 refs
21
- - **`boostConfidence`** [function] (src/store/confidence.ts:4) — 0 refs
22
- - **`getStaleAnnotations`** [function] (src/store/confidence.ts:37) — 0 refs
23
- - **`promoteSecurityAnnotations`** [function] (src/store/confidence.ts:47) — 0 refs
24
45
  - **`NeuralProvider`** [class] (src/store/vectors.ts:122) — 0 refs
25
46
  - **`SimilarResult`** [interface] (src/store/vectors.ts:23) — 0 refs
26
47
 
27
48
  ## Entry Points
28
- - **`Database`** [class] — 42 incoming references
29
- - **`get`** [method] — 21 incoming references
30
- - **`close`** [method] — 16 incoming references
31
- - **`AnnotationStore`** [class] — 14 incoming references
49
+ - **`Database`** [class] — 77 incoming references
50
+ - **`close`** [method] — 30 incoming references
51
+ - **`get`** [method] — 22 incoming references
52
+ - **`AnnotationStore`** [class] — 19 incoming references
32
53
  - **`rowToSymbol`** [function] — 13 incoming references
33
54
 
34
55
  ## Dependencies
35
56
  - **root**: `Annotation`, `AnnotationKey`, `Session`, `EvolutionEvent`, `CodeSymbol`, `SymbolLink`, `RepoEntry`, `has` (+1 more)
36
- - **scripts**: `run`
37
57
  - **analyzer**: `find`, `resolve`
58
+ - **test**: `dbPath`
38
59
 
39
60
  ## Used By
40
- - **root**: `Database`, `RepoRegistry`, `AnnotationStore`, `runDecayPass`, `getIncomingLinks`, `getAllSymbols`, `getCodebaseSummary`, `register` (+23 more)
41
- - **analyzer**: `Database`, `TfIdfProvider`, `EmbeddingStore`, `buildEmbeddingText`, `get`, `clear`, `isFileUpToDate`, `upsertFileHash` (+22 more)
42
- - **server**: `Database`, `AnnotationStore`, `RepoRegistry`, `getCodebaseSummary`, `recall`, `close`, `getStats`, `getTestCoverage` (+33 more)
43
- - **test**: `Database`, `RepoRegistry`, `TfIdfProvider`, `EmbeddingStore`, `buildEmbeddingText`, `close`, `insertSymbol`, `findSymbolByName` (+44 more)
61
+ - **root**: `Database`, `RepoRegistry`, `AnnotationStore`, `runDecayPass`, `getIncomingLinks`, `getAllSymbols`, `getCodebaseSummary`, `register` (+25 more)
62
+ - **analyzer**: `Database`, `TfIdfProvider`, `EmbeddingStore`, `buildEmbeddingText`, `get`, `clearFiles`, `clear`, `isFileUpToDate` (+23 more)
63
+ - **orchestrator**: `Database`, `findSymbolByName`, `findUpstream`, `clear`, `getTestCoverageGaps`, `findDeadCode`, `close`
64
+ - **server**: `Database`, `AnnotationStore`, `RepoRegistry`, `runDecayPass`, `getCodebaseSummary`, `recall`, `close`, `getStats` (+37 more)
65
+ - **test**: `Database`, `AnnotationStore`, `RepoRegistry`, `boostConfidence`, `decayConfidence`, `getStaleAnnotations`, `promoteSecurityAnnotations`, `runDecayPass` (+76 more)
44
66
  - **apps**: `remove`, `Database`, `getCodebaseSummary`, `close`
45
67
  - **docs**: `remove`
46
68
  - **parser**: `load`
@@ -5,8 +5,28 @@ description: Code intelligence for the test area — symbols, dependencies, and
5
5
 
6
6
  # Test
7
7
 
8
+ ## Working with this area
9
+ When working with code in **test/**, follow these mandatory safety rules:
10
+
11
+ ### Before editing any symbol in this area:
12
+ 1. Call `mcp_milens_impact({target: "<symbol>", repo: "<workspaceRoot>"})` — check blast radius
13
+ 2. If depth-1 dependents > 5 → **STOP and warn** before proceeding
14
+ 3. Call `mcp_milens_context({name: "<symbol>", repo: "<workspaceRoot>"})` — see all callers/callees
15
+
16
+ ### Before committing changes in this area:
17
+ 1. Call `mcp_milens_detect_changes({repo: "<workspaceRoot>"})` — verify scope
18
+ 2. If unexpected files changed → **STOP and report**
19
+
20
+ ### Key tools for this area:
21
+ | Task | Tool |
22
+ |---|---|
23
+ | Find all references | `mcp_milens_context` |
24
+ | Check edit safety | `mcp_milens_edit_check` |
25
+ | Text search across files | `mcp_milens_grep` |
26
+ | See file symbols | `mcp_milens_get_file_symbols` |
27
+
8
28
  ## Overview
9
- Contains 129 symbols (43 exported) across 31 files.
29
+ Contains 195 symbols (43 exported) across 49 files.
10
30
 
11
31
  ## Key Symbols
12
32
  - **`User`** [interface] (test/fixtures/ts-project/src/models.ts:1) — 5 refs
@@ -26,18 +46,28 @@ Contains 129 symbols (43 exported) across 31 files.
26
46
  - **`UserController`** [class] (test/fixtures/ts-project/src/nest-sample.ts:18) — 1 refs
27
47
 
28
48
  ## Entry Points
49
+ - **`lang`** [variable] — 12 incoming references
50
+ - **`dbPath`** [function] — 10 incoming references
29
51
  - **`User`** [interface] — 5 incoming references
52
+ - **`parser`** [variable] — 3 incoming references
30
53
  - **`createUser`** [function] — 2 incoming references
31
- - **`UserRole`** [type] — 2 incoming references
32
- - **`create_user`** [function] — 2 incoming references
33
- - **`User`** [class] — 2 incoming references
34
54
 
35
55
  ## Dependencies
36
- - **store**: `Database`, `RepoRegistry`, `TfIdfProvider`, `EmbeddingStore`, `buildEmbeddingText`, `close`, `insertSymbol`, `findSymbolByName` (+44 more)
37
- - **root**: `CodeSymbol`, `SymbolLink`, `RawImport`, `RawCall`, `RawHeritage`, `RawTypeBinding`, `RawAssignmentBinding`, `RawReturnType` (+2 more)
38
- - **parser**: `getParser`, `loadLanguage`, `extractFromTree`, `extractVueScript`, `extractVueTemplateRefs`, `spec`, `extractHtmlScripts`, `extractHtmlRefs` (+2 more)
39
- - **analyzer**: `resolveLinks`, `resolveLinksWithStats`, `reviewSymbol`, `scanFiles`, `generateTestPlan`, `findCoverageGaps`, `analyze`, `loadAliases` (+1 more)
40
- - **scripts**: `run`
56
+ - **root**: `generateAgentsMd`, `AnnotationKey`, `CodeSymbol`, `SymbolLink`, `computeMetrics`, `formatMetricsReport`, `MilensMetrics`, `RawImport` (+9 more)
57
+ - **store**: `Database`, `AnnotationStore`, `RepoRegistry`, `boostConfidence`, `decayConfidence`, `getStaleAnnotations`, `promoteSecurityAnnotations`, `runDecayPass` (+76 more)
58
+ - **security**: `detectEcosystem`, `parseDependencies`, `checkVulnerabilities`, `auditDependencies`, `loadRules`, `getRulesByCategory`, `getRulesBySeverity`
59
+ - **analyzer**: `enrichMetadata`, `resolveLinks`, `resolveLinksWithStats`, `reviewSymbol`, `reviewPr`, `scanFiles`, `generateTestPlan`, `findCoverageGaps` (+5 more)
60
+ - **parser**: `getParser`, `loadLanguage`, `extractFromTree`, `extractVueScript`, `extractVueTemplateRefs`, `spec`, `extractHtmlScripts`, `extractHtmlRefs` (+7 more)
61
+ - **server**: `HookManager`, `HookConfig`, `defaultOnSessionStart`, `defaultOnSessionEnd`, `defaultOnPreCommit`, `defaultOnFileChange`, `defaultOnPreCompact`, `defaultOnPostCompact` (+10 more)
62
+ - **orchestrator**: `Orchestrator`, `formatReport`, `OrchestratorReport`, `subscribe`, `run`, `snapshot`, `compare`, `cancel` (+3 more)
63
+
64
+ ## Used By
65
+ - **apps**: `dbPath`
66
+ - **analyzer**: `parser`, `lang`
67
+ - **root**: `dbPath`
68
+ - **parser**: `lang`, `parser`
69
+ - **server**: `dbPath`
70
+ - **store**: `dbPath`
41
71
 
42
72
  ## Files
43
73
  - test/fixtures/go-project/models/user.go
@@ -59,15 +89,33 @@ Contains 129 symbols (43 exported) across 31 files.
59
89
  - test/fixtures/vue-project-refs/src/views/TestView.vue
60
90
  - test/fixtures/vue-project/src/composables/useClipboard.js
61
91
  - test/fixtures/vue-project/src/views/TestView.vue
92
+ - test/unit/agents-md.test.ts
93
+ - test/unit/annotations.test.ts
94
+ - test/unit/cli.test.ts
95
+ - test/unit/confidence.test.ts
62
96
  - test/unit/database.test.ts
63
97
  - test/unit/db-extended.test.ts
98
+ - test/unit/deps-audit.test.ts
99
+ - test/unit/enrich.test.ts
64
100
  - test/unit/extractor.test.ts
101
+ - test/unit/hooks.test.ts
65
102
  - test/unit/html-css.test.ts
103
+ - test/unit/languages.test.ts
66
104
  - test/unit/markdown.test.ts
105
+ - test/unit/mcp-prompts.test.ts
106
+ - test/unit/mcp-tools.test.ts
107
+ - test/unit/metrics.test.ts
108
+ - test/unit/orchestrator.test.ts
109
+ - test/unit/parser-extract-cache.test.ts
110
+ - test/unit/parser-loader.test.ts
67
111
  - test/unit/registry.test.ts
68
112
  - test/unit/resolver.test.ts
69
113
  - test/unit/review.test.ts
70
114
  - test/unit/scanner.test.ts
115
+ - test/unit/security-rules.test.ts
116
+ - test/unit/server-test-plan.test.ts
117
+ - test/unit/skills.test.ts
71
118
  - test/unit/testplan.test.ts
119
+ - test/unit/utils.test.ts
72
120
  - test/unit/vectors.test.ts
73
121
  - test/unit/vue-import.test.ts