milens 0.7.1 → 0.7.3

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 (119) hide show
  1. package/.agents/skills/adapters/SKILL.md +59 -54
  2. package/.agents/skills/analyzer/SKILL.md +83 -78
  3. package/.agents/skills/apps/SKILL.md +65 -60
  4. package/.agents/skills/docs/SKILL.md +63 -58
  5. package/.agents/skills/milens/SKILL.md +322 -319
  6. package/.agents/skills/milens-security-review/SKILL.md +224 -224
  7. package/.agents/skills/orchestrator/SKILL.md +64 -59
  8. package/.agents/skills/parser/SKILL.md +86 -81
  9. package/.agents/skills/root/SKILL.md +89 -84
  10. package/.agents/skills/scripts/SKILL.md +56 -51
  11. package/.agents/skills/security/SKILL.md +67 -62
  12. package/.agents/skills/server/SKILL.md +84 -77
  13. package/.agents/skills/store/SKILL.md +77 -72
  14. package/.agents/skills/test/SKILL.md +155 -148
  15. package/.agents/skills/ui/SKILL.md +56 -51
  16. package/README.md +577 -577
  17. package/adapters/README.md +144 -144
  18. package/adapters/claude-code/.claude/mcp.json +9 -9
  19. package/adapters/claude-code/.claude/settings.json.hooks-snippet.json +26 -26
  20. package/adapters/claude-code/.claude-plugin/plugin.json +11 -11
  21. package/adapters/claude-code/.mcp.json +9 -9
  22. package/adapters/claude-code/CLAUDE.md +81 -79
  23. package/adapters/claude-code/hooks/hooks.json +27 -0
  24. package/adapters/codex/.codex/config.toml +3 -3
  25. package/adapters/copilot/.vscode/mcp.json +10 -10
  26. package/adapters/cursor/.cursor/mcp.json +9 -9
  27. package/adapters/cursor/.cursorrules +69 -69
  28. package/adapters/gemini/.gemini/context.md +81 -81
  29. package/adapters/gemini/.gemini/settings.json +9 -9
  30. package/adapters/opencode/.opencode/config.json +8 -8
  31. package/adapters/zed/.zed/settings.json +8 -8
  32. package/dist/agents-md.d.ts +1 -0
  33. package/dist/agents-md.js +45 -1
  34. package/dist/agents-md.js.map +1 -1
  35. package/dist/analyzer/config.js +32 -0
  36. package/dist/analyzer/config.js.map +1 -1
  37. package/dist/analyzer/engine.js +26 -2
  38. package/dist/analyzer/engine.js.map +1 -1
  39. package/dist/analyzer/enrich.js +68 -1
  40. package/dist/analyzer/enrich.js.map +1 -1
  41. package/dist/analyzer/resolver.d.ts +4 -1
  42. package/dist/analyzer/resolver.js +241 -38
  43. package/dist/analyzer/resolver.js.map +1 -1
  44. package/dist/analyzer/review.js +32 -2
  45. package/dist/analyzer/review.js.map +1 -1
  46. package/dist/analyzer/scanner.js +3 -0
  47. package/dist/analyzer/scanner.js.map +1 -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 -2
  51. package/dist/build-info.js +2 -2
  52. package/dist/cli.js +566 -497
  53. package/dist/cli.js.map +1 -1
  54. package/dist/orchestrator/orchestrator.d.ts +1 -1
  55. package/dist/orchestrator/orchestrator.js +14 -6
  56. package/dist/orchestrator/orchestrator.js.map +1 -1
  57. package/dist/parser/extract.d.ts +7 -0
  58. package/dist/parser/extract.js +23 -1
  59. package/dist/parser/extract.js.map +1 -1
  60. package/dist/parser/lang-css.js +18 -6
  61. package/dist/parser/lang-css.js.map +1 -1
  62. package/dist/parser/lang-go.js +58 -58
  63. package/dist/parser/lang-html.js +3 -3
  64. package/dist/parser/lang-java.js +37 -37
  65. package/dist/parser/lang-js.js +120 -109
  66. package/dist/parser/lang-js.js.map +1 -1
  67. package/dist/parser/lang-md.js +1 -0
  68. package/dist/parser/lang-md.js.map +1 -1
  69. package/dist/parser/lang-php.js +45 -45
  70. package/dist/parser/lang-py.js +43 -43
  71. package/dist/parser/lang-ruby.js +28 -28
  72. package/dist/parser/lang-rust.js +48 -48
  73. package/dist/parser/lang-ts.js +230 -196
  74. package/dist/parser/lang-ts.js.map +1 -1
  75. package/dist/parser/lang-vue.js +0 -21
  76. package/dist/parser/lang-vue.js.map +1 -1
  77. package/dist/security/rules.js +22 -23
  78. package/dist/security/rules.js.map +1 -1
  79. package/dist/server/guard-hook.d.ts +10 -0
  80. package/dist/server/guard-hook.js +179 -0
  81. package/dist/server/guard-hook.js.map +1 -0
  82. package/dist/server/hooks.js +2 -1
  83. package/dist/server/hooks.js.map +1 -1
  84. package/dist/server/mcp-prompts.js +502 -502
  85. package/dist/server/mcp.js +228 -86
  86. package/dist/server/mcp.js.map +1 -1
  87. package/dist/server/test-plan.d.ts +1 -0
  88. package/dist/server/test-plan.js +25 -7
  89. package/dist/server/test-plan.js.map +1 -1
  90. package/dist/server/tools/findings-report.d.ts +3 -0
  91. package/dist/server/tools/findings-report.js +170 -0
  92. package/dist/server/tools/findings-report.js.map +1 -0
  93. package/dist/server/tools/security.js +61 -5
  94. package/dist/server/tools/security.js.map +1 -1
  95. package/dist/server/tools/session.js +37 -17
  96. package/dist/server/tools/session.js.map +1 -1
  97. package/dist/server/tools/testing.js +58 -11
  98. package/dist/server/tools/testing.js.map +1 -1
  99. package/dist/skills.js +307 -301
  100. package/dist/skills.js.map +1 -1
  101. package/dist/store/annotations.d.ts +5 -0
  102. package/dist/store/annotations.js +45 -9
  103. package/dist/store/annotations.js.map +1 -1
  104. package/dist/store/db.d.ts +13 -0
  105. package/dist/store/db.js +318 -205
  106. package/dist/store/db.js.map +1 -1
  107. package/dist/store/registry.d.ts +1 -0
  108. package/dist/store/registry.js +17 -6
  109. package/dist/store/registry.js.map +1 -1
  110. package/dist/store/schema.sql +144 -143
  111. package/dist/store/vectors.js +2 -2
  112. package/dist/types.d.ts +16 -1
  113. package/dist/uninstall.d.ts +1 -0
  114. package/dist/uninstall.js +33 -10
  115. package/dist/uninstall.js.map +1 -1
  116. package/dist/utils.d.ts +1 -1
  117. package/dist/utils.js +0 -0
  118. package/dist/utils.js.map +1 -1
  119. package/package.json +85 -85
@@ -1,81 +1,86 @@
1
- ---
2
- name: milens-parser
3
- description: Code intelligence for the parser area — symbols, dependencies, and entry points
4
- ---
5
-
6
- # Parser
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
-
28
- ## Overview
29
- Contains 82 symbols (31 exported) across 16 files.
30
-
31
- ## Key Symbols
32
- - **`LangSpec`** [interface] (src/parser/extract.ts:6) — 32 refs
33
- - **`loadLanguage`** [function] (src/parser/loader.ts:21) — 15 refs
34
- - **`getParser`** [function] (src/parser/loader.ts:32) 14 refs
35
- - **`extractFromTree`** [function] (src/parser/extract.ts:267) — 9 refs
36
- - **`supportedExtensions`** [function] (src/parser/languages.ts:29) — 6 refs
37
- - **`extractHtmlScripts`** [function] (src/parser/lang-html.ts:38) — 5 refs
38
- - **`extractMarkdown`** [function] (src/parser/lang-md.ts:34) — 5 refs
39
- - **`spec`** [variable] (src/parser/lang-ts.ts:5) — 5 refs
40
- - **`extractVueScript`** [function] (src/parser/lang-vue.ts:19) — 5 refs
41
- - **`initTreeSitter`** [function] (src/parser/loader.ts:15) — 5 refs
42
- - **`clearQueryCache`** [function] (src/parser/extract.ts:72) — 4 refs
43
- - **`extractHtmlRefs`** [function] (src/parser/lang-html.ts:57) — 4 refs
44
- - **`extractHtmlLinks`** [function] (src/parser/lang-html.ts:99) — 4 refs
45
- - **`spec`** [variable] (src/parser/lang-js.ts:5) — 4 refs
46
- - **`extractVueTemplateRefs`** [function] (src/parser/lang-vue.ts:38) — 4 refs
47
-
48
- ## Entry Points
49
- - **`LangSpec`** [interface] — 32 incoming references
50
- - **`loadLanguage`** [function] — 15 incoming references
51
- - **`getParser`** [function] — 14 incoming references
52
- - **`extractFromTree`** [function] — 9 incoming references
53
- - **`supportedExtensions`** [function] — 6 incoming references
54
-
55
- ## Dependencies
56
- - **root**: `CodeSymbol`, `RawImport`, `RawCall`, `RawHeritage`, `RawReExport`, `RawTypeBinding`, `RawAssignmentBinding`, `RawReturnType` (+3 more)
57
- - **analyzer**: `resolve`
58
- - **store**: `load`
59
-
60
- ## Used By
61
- - **analyzer**: `langForFile`, `supportedExtensions`, `getParser`, `loadLanguage`, `extractFromTree`, `clearQueryCache`, `extractVueScript`, `extractVueTemplateRefs` (+9 more)
62
- - **server**: `getParser`, `loadLanguage`, `ALL_LANGS`
63
- - **test**: `getParser`, `loadLanguage`, `extractFromTree`, `extractVueScript`, `extractVueTemplateRefs`, `extractVueCompositionApi`, `extractVueTemplateAst`, `spec` (+11 more)
64
-
65
- ## Files
66
- - src/parser/extract.ts
67
- - src/parser/lang-css.ts
68
- - src/parser/lang-go.ts
69
- - src/parser/lang-html.ts
70
- - src/parser/lang-java.ts
71
- - src/parser/lang-js.ts
72
- - src/parser/lang-md.ts
73
- - src/parser/lang-php.ts
74
- - src/parser/lang-py.ts
75
- - src/parser/lang-ruby.ts
76
- - src/parser/lang-rust.ts
77
- - src/parser/lang-ts.ts
78
- - src/parser/lang-vue.ts
79
- - src/parser/language-provider.ts
80
- - src/parser/languages.ts
81
- - src/parser/loader.ts
1
+ ---
2
+ generated-by: milens
3
+ name: milens-parser
4
+ description: Code intelligence for the parser area — symbols, dependencies, and entry points
5
+ ---
6
+
7
+ <!-- Generated by milens — safe to delete/regenerate -->
8
+ # Parser
9
+
10
+ ## Working with this area
11
+ When working with code in **parser/**, follow these mandatory safety rules:
12
+
13
+ ### Before editing any symbol in this area:
14
+ 1. Call `mcp_milens_impact({target: "<symbol>", repo: "<workspaceRoot>"})` — check blast radius
15
+ 2. If depth-1 dependents > 5 → **STOP and warn** before proceeding
16
+ 3. Call `mcp_milens_context({name: "<symbol>", repo: "<workspaceRoot>"})` — see all callers/callees
17
+
18
+ ### Before committing changes in this area:
19
+ 1. Call `mcp_milens_detect_changes({repo: "<workspaceRoot>"})` — verify scope
20
+ 2. If unexpected files changed → **STOP and report**
21
+
22
+ ### Key tools for this area:
23
+ | Task | Tool |
24
+ |---|---|
25
+ | Find all references | `mcp_milens_context` |
26
+ | Check edit safety | `mcp_milens_edit_check` |
27
+ | Text search across files | `mcp_milens_grep` |
28
+ | See file symbols | `mcp_milens_get_file_symbols` |
29
+
30
+ ### Edit-safety enforcement
31
+ A `PreToolUse` hook (warn mode by default) reminds you if no milens safety check (`impact`/`context`/`overview`/`guard_edit_check`/`edit_check`/`smart_context`) was called before an `Edit`/`Write`/`MultiEdit`. Opt-in strict deny mode is available via `milens hooks guard-set-mode --mode strict`. Both modes consume the check after one edit. See `.milens/hook-state/config.json`. Known caveat: the underlying `PreToolUse` deny mechanism has at least one reliability issue (https://github.com/anthropics/claude-code/issues/4362).
32
+
33
+ ## Overview
34
+ Contains 85 symbols (31 exported) across 16 files.
35
+
36
+ ## Key Symbols
37
+ - **`LangSpec`** [interface] (src/parser/extract.ts:6) — 32 refs
38
+ - **`loadLanguage`** [function] (src/parser/loader.ts:21) — 15 refs
39
+ - **`getParser`** [function] (src/parser/loader.ts:32) — 14 refs
40
+ - **`extractFromTree`** [function] (src/parser/extract.ts:274) — 9 refs
41
+ - **`supportedExtensions`** [function] (src/parser/languages.ts:29) — 6 refs
42
+ - **`extractHtmlScripts`** [function] (src/parser/lang-html.ts:38) — 5 refs
43
+ - **`extractMarkdown`** [function] (src/parser/lang-md.ts:34) — 5 refs
44
+ - **`spec`** [variable] (src/parser/lang-ts.ts:1) — 5 refs
45
+ - **`extractVueScript`** [function] (src/parser/lang-vue.ts:19) — 5 refs
46
+ - **`initTreeSitter`** [function] (src/parser/loader.ts:15) — 5 refs
47
+ - **`clearQueryCache`** [function] (src/parser/extract.ts:79) — 4 refs
48
+ - **`extractHtmlRefs`** [function] (src/parser/lang-html.ts:57) — 4 refs
49
+ - **`extractHtmlLinks`** [function] (src/parser/lang-html.ts:99) 4 refs
50
+ - **`spec`** [variable] (src/parser/lang-js.ts:1) 4 refs
51
+ - **`extractVueTemplateRefs`** [function] (src/parser/lang-vue.ts:38) 4 refs
52
+
53
+ ## Entry Points
54
+ - **`LangSpec`** [interface] — 32 incoming references
55
+ - **`loadLanguage`** [function] — 15 incoming references
56
+ - **`getParser`** [function] 14 incoming references
57
+ - **`extractFromTree`** [function] — 9 incoming references
58
+ - **`supportedExtensions`** [function] — 6 incoming references
59
+
60
+ ## Dependencies
61
+ - **root**: `CodeSymbol`, `RawImport`, `RawCall`, `RawHeritage`, `RawReExport`, `RawTypeBinding`, `RawAssignmentBinding`, `RawReturnType` (+4 more)
62
+ - **analyzer**: `resolve`
63
+ - **store**: `load`
64
+
65
+ ## Used By
66
+ - **analyzer**: `langForFile`, `supportedExtensions`, `getParser`, `loadLanguage`, `extractFromTree`, `clearQueryCache`, `extractVueScript`, `extractVueTemplateRefs` (+9 more)
67
+ - **server**: `getParser`, `loadLanguage`, `ALL_LANGS`
68
+ - **test**: `getParser`, `loadLanguage`, `extractFromTree`, `extractVueScript`, `extractVueTemplateRefs`, `extractVueCompositionApi`, `extractVueTemplateAst`, `spec` (+11 more)
69
+
70
+ ## Files
71
+ - src/parser/extract.ts
72
+ - src/parser/lang-css.ts
73
+ - src/parser/lang-go.ts
74
+ - src/parser/lang-html.ts
75
+ - src/parser/lang-java.ts
76
+ - src/parser/lang-js.ts
77
+ - src/parser/lang-md.ts
78
+ - src/parser/lang-php.ts
79
+ - src/parser/lang-py.ts
80
+ - src/parser/lang-ruby.ts
81
+ - src/parser/lang-rust.ts
82
+ - src/parser/lang-ts.ts
83
+ - src/parser/lang-vue.ts
84
+ - src/parser/language-provider.ts
85
+ - src/parser/languages.ts
86
+ - src/parser/loader.ts
@@ -1,84 +1,89 @@
1
- ---
2
- name: milens-root
3
- description: Code intelligence for the root area — symbols, dependencies, and entry points
4
- ---
5
-
6
- # Root
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
-
28
- ## Overview
29
- Contains 236 symbols (156 exported) across 12 files.
30
-
31
- ## Key Symbols
32
- - **`CodeSymbol`** [interface] (src/types.ts:8) — 50 refs
33
- - **`SymbolLink`** [interface] (src/types.ts:26) — 22 refs
34
- - **`RawCall`** [interface] (src/types.ts:45) 15 refs
35
- - **`isTestFile`** [function] (src/utils.ts:2) — 10 refs
36
- - **`RawImport`** [interface] (src/types.ts:35) — 9 refs
37
- - **`RawHeritage`** [interface] (src/types.ts:59) — 7 refs
38
- - **`ExtractionResult`** [interface] (src/types.ts:67) — 6 refs
39
- - **`RawTypeBinding`** [interface] (src/types.ts:87) — 6 refs
40
- - **`RawAssignmentBinding`** [interface] (src/types.ts:95) — 6 refs
41
- - **`globToRegex`** [function] (src/utils.ts:11) — 6 refs
42
- - **`RawReturnType`** [interface] (src/types.ts:103) — 5 refs
43
- - **`RawCallResultBinding`** [interface] (src/types.ts:111) — 5 refs
44
- - **`AnalysisStats`** [interface] (src/types.ts:120) — 5 refs
45
- - **`generateAgentsMd`** [function] (src/agents-md.ts:93) — 4 refs
46
- - **`computeMetrics`** [function] (src/metrics.ts:21) — 4 refs
47
-
48
- ## Entry Points
49
- - **`CodeSymbol`** [interface] — 50 incoming references
50
- - **`SymbolLink`** [interface] — 22 incoming references
51
- - **`RawCall`** [interface] — 15 incoming references
52
- - **`isTestFile`** [function] — 10 incoming references
53
- - **`RawImport`** [interface] — 9 incoming references
54
-
55
- ## Dependencies
56
- - **store**: `Database`, `RepoRegistry`, `AnnotationStore`, `runDecayPass`, `getIncomingLinks`, `getAllSymbols`, `getCodebaseSummary`, `findDbPath` (+22 more)
57
- - **analyzer**: `loadAliases`, `analyze`, `resolve`
58
- - **ui**: `createProgressReporter`, `finalize`
59
- - **server**: `startHttp`, `startStdio`, `HookManager`, `defaultOnSessionStart`, `defaultOnSessionEnd`, `defaultOnPreCompact`, `defaultOnPostCompact`, `enableHook` (+3 more)
60
- - **security**: `loadRules`, `auditDependencies`
61
- - **orchestrator**: `Orchestrator`, `subscribe`, `runAndFormat`
62
-
63
- ## Used By
64
- - **analyzer**: `isTestFile`, `CodeSymbol`, `ExtractionResult`, `RawImport`, `RawCall`, `RawHeritage`, `RawReExport`, `RawTypeBinding` (+7 more)
65
- - **orchestrator**: `CodeSymbol`
66
- - **parser**: `CodeSymbol`, `RawImport`, `RawCall`, `RawHeritage`, `RawReExport`, `RawTypeBinding`, `RawAssignmentBinding`, `RawReturnType` (+3 more)
67
- - **server**: `generateCrossRefSection`, `globToRegex`
68
- - **store**: `Annotation`, `AnnotationKey`, `Session`, `EvolutionEvent`, `CodeSymbol`, `SymbolLink`, `RepoEntry`
69
- - **ui**: `AnalysisStats`
70
- - **test**: `generateAgentsMd`, `AnnotationKey`, `CodeSymbol`, `SymbolLink`, `computeMetrics`, `formatMetricsReport`, `MilensMetrics`, `RawImport` (+17 more)
71
-
72
- ## Files
73
- - AGENTS.md
74
- - CLAUDE.md
75
- - CONTRIBUTING.md
76
- - README.md
77
- - src/agents-md.ts
78
- - src/cli.ts
79
- - src/metrics.ts
80
- - src/skills.ts
81
- - src/types.ts
82
- - src/uninstall.ts
83
- - src/utils.ts
84
- - vitest.config.ts
1
+ ---
2
+ generated-by: milens
3
+ name: milens-root
4
+ description: Code intelligence for the root area — symbols, dependencies, and entry points
5
+ ---
6
+
7
+ <!-- Generated by milens — safe to delete/regenerate -->
8
+ # Root
9
+
10
+ ## Working with this area
11
+ When working with code in **root/**, follow these mandatory safety rules:
12
+
13
+ ### Before editing any symbol in this area:
14
+ 1. Call `mcp_milens_impact({target: "<symbol>", repo: "<workspaceRoot>"})` — check blast radius
15
+ 2. If depth-1 dependents > 5 → **STOP and warn** before proceeding
16
+ 3. Call `mcp_milens_context({name: "<symbol>", repo: "<workspaceRoot>"})` — see all callers/callees
17
+
18
+ ### Before committing changes in this area:
19
+ 1. Call `mcp_milens_detect_changes({repo: "<workspaceRoot>"})` — verify scope
20
+ 2. If unexpected files changed → **STOP and report**
21
+
22
+ ### Key tools for this area:
23
+ | Task | Tool |
24
+ |---|---|
25
+ | Find all references | `mcp_milens_context` |
26
+ | Check edit safety | `mcp_milens_edit_check` |
27
+ | Text search across files | `mcp_milens_grep` |
28
+ | See file symbols | `mcp_milens_get_file_symbols` |
29
+
30
+ ### Edit-safety enforcement
31
+ A `PreToolUse` hook (warn mode by default) reminds you if no milens safety check (`impact`/`context`/`overview`/`guard_edit_check`/`edit_check`/`smart_context`) was called before an `Edit`/`Write`/`MultiEdit`. Opt-in strict deny mode is available via `milens hooks guard-set-mode --mode strict`. Both modes consume the check after one edit. See `.milens/hook-state/config.json`. Known caveat: the underlying `PreToolUse` deny mechanism has at least one reliability issue (https://github.com/anthropics/claude-code/issues/4362).
32
+
33
+ ## Overview
34
+ Contains 238 symbols (157 exported) across 12 files.
35
+
36
+ ## Key Symbols
37
+ - **`CodeSymbol`** [interface] (src/types.ts:8) — 52 refs
38
+ - **`SymbolLink`** [interface] (src/types.ts:26) — 22 refs
39
+ - **`RawCall`** [interface] (src/types.ts:45) — 18 refs
40
+ - **`isTestFile`** [function] (src/utils.ts:4) — 10 refs
41
+ - **`RawImport`** [interface] (src/types.ts:35) — 9 refs
42
+ - **`RawHeritage`** [interface] (src/types.ts:59) — 7 refs
43
+ - **`ExtractionResult`** [interface] (src/types.ts:67) — 6 refs
44
+ - **`RawTypeBinding`** [interface] (src/types.ts:88) — 6 refs
45
+ - **`RawAssignmentBinding`** [interface] (src/types.ts:96) — 6 refs
46
+ - **`globToRegex`** [function] (src/utils.ts:16) — 6 refs
47
+ - **`RawReturnType`** [interface] (src/types.ts:104) — 5 refs
48
+ - **`RawCallResultBinding`** [interface] (src/types.ts:112) — 5 refs
49
+ - **`AnalysisStats`** [interface] (src/types.ts:135) 5 refs
50
+ - **`generateAgentsMd`** [function] (src/agents-md.ts:93) 4 refs
51
+ - **`computeMetrics`** [function] (src/metrics.ts:21) 4 refs
52
+
53
+ ## Entry Points
54
+ - **`CodeSymbol`** [interface] — 52 incoming references
55
+ - **`SymbolLink`** [interface] — 22 incoming references
56
+ - **`RawCall`** [interface] 18 incoming references
57
+ - **`isTestFile`** [function] 10 incoming references
58
+ - **`RawImport`** [interface] — 9 incoming references
59
+
60
+ ## Dependencies
61
+ - **store**: `Database`, `RepoRegistry`, `AnnotationStore`, `runDecayPass`, `getIncomingLinks`, `getAllSymbols`, `getCodebaseSummary`, `findDbPath` (+22 more)
62
+ - **analyzer**: `loadAliases`, `analyze`, `resolve`
63
+ - **ui**: `createProgressReporter`, `finalize`
64
+ - **server**: `startHttp`, `startStdio`, `HookManager`, `defaultOnSessionStart`, `defaultOnSessionEnd`, `defaultOnPreCompact`, `defaultOnPostCompact`, `handleMarkChecked` (+6 more)
65
+ - **security**: `loadRules`, `auditDependencies`
66
+ - **orchestrator**: `Orchestrator`, `subscribe`, `runAndFormat`
67
+
68
+ ## Used By
69
+ - **analyzer**: `isTestFile`, `CodeSymbol`, `ExtractionResult`, `RawImport`, `RawCall`, `RawHeritage`, `RawReExport`, `RawTypeBinding` (+8 more)
70
+ - **orchestrator**: `CodeSymbol`
71
+ - **parser**: `CodeSymbol`, `RawImport`, `RawCall`, `RawHeritage`, `RawReExport`, `RawTypeBinding`, `RawAssignmentBinding`, `RawReturnType` (+4 more)
72
+ - **server**: `generateCrossRefSection`, `globToRegex`
73
+ - **store**: `Annotation`, `AnnotationKey`, `Session`, `EvolutionEvent`, `CodeSymbol`, `SymbolLink`, `RepoEntry`
74
+ - **ui**: `AnalysisStats`
75
+ - **test**: `generateAgentsMd`, `AnnotationKey`, `CodeSymbol`, `SymbolLink`, `computeMetrics`, `formatMetricsReport`, `MilensMetrics`, `RawImport` (+18 more)
76
+
77
+ ## Files
78
+ - AGENTS.md
79
+ - CLAUDE.md
80
+ - CONTRIBUTING.md
81
+ - README.md
82
+ - src/agents-md.ts
83
+ - src/cli.ts
84
+ - src/metrics.ts
85
+ - src/skills.ts
86
+ - src/types.ts
87
+ - src/uninstall.ts
88
+ - src/utils.ts
89
+ - vitest.config.ts
@@ -1,51 +1,56 @@
1
- ---
2
- name: milens-scripts
3
- description: Code intelligence for the scripts area — symbols, dependencies, and entry points
4
- ---
5
-
6
- # Scripts
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
-
28
- ## Overview
29
- Contains 77 symbols (0 exported) across 6 files.
30
-
31
- ## Entry Points
32
- - **`ghApi`** [function] — 4 incoming references
33
- - **`detectBreakingFromLabels`** [function] — 4 incoming references
34
- - **`exec`** [function] 3 incoming references
35
- - **`branch`** [variable] — 3 incoming references
36
- - **`detectTypeFromBranch`** [function] — 3 incoming references
37
-
38
- ## Dependencies
39
- - **analyzer**: `resolve`
40
-
41
- ## Used By
42
- - **apps**: `parseArgs`, `generatePrPayload`
43
- - **test**: `detectTypeFromBranch`, `detectScopeFromBranch`, `detectBreakingFromBranch`, `detectBreakingFromLabels`, `slugify`, `parseArgs`, `generateTitle`, `generateBody` (+1 more)
44
-
45
- ## Files
46
- - scripts/build-standalone.mjs
47
- - scripts/check-console.mjs
48
- - scripts/create-pr.cjs
49
- - scripts/gen-build-info.mjs
50
- - scripts/pr-generator.cjs
51
- - scripts/smoke-test.mjs
1
+ ---
2
+ generated-by: milens
3
+ name: milens-scripts
4
+ description: Code intelligence for the scripts area — symbols, dependencies, and entry points
5
+ ---
6
+
7
+ <!-- Generated by milens — safe to delete/regenerate -->
8
+ # Scripts
9
+
10
+ ## Working with this area
11
+ When working with code in **scripts/**, follow these mandatory safety rules:
12
+
13
+ ### Before editing any symbol in this area:
14
+ 1. Call `mcp_milens_impact({target: "<symbol>", repo: "<workspaceRoot>"})` — check blast radius
15
+ 2. If depth-1 dependents > 5 → **STOP and warn** before proceeding
16
+ 3. Call `mcp_milens_context({name: "<symbol>", repo: "<workspaceRoot>"})` — see all callers/callees
17
+
18
+ ### Before committing changes in this area:
19
+ 1. Call `mcp_milens_detect_changes({repo: "<workspaceRoot>"})` — verify scope
20
+ 2. If unexpected files changed → **STOP and report**
21
+
22
+ ### Key tools for this area:
23
+ | Task | Tool |
24
+ |---|---|
25
+ | Find all references | `mcp_milens_context` |
26
+ | Check edit safety | `mcp_milens_edit_check` |
27
+ | Text search across files | `mcp_milens_grep` |
28
+ | See file symbols | `mcp_milens_get_file_symbols` |
29
+
30
+ ### Edit-safety enforcement
31
+ A `PreToolUse` hook (warn mode by default) reminds you if no milens safety check (`impact`/`context`/`overview`/`guard_edit_check`/`edit_check`/`smart_context`) was called before an `Edit`/`Write`/`MultiEdit`. Opt-in strict deny mode is available via `milens hooks guard-set-mode --mode strict`. Both modes consume the check after one edit. See `.milens/hook-state/config.json`. Known caveat: the underlying `PreToolUse` deny mechanism has at least one reliability issue (https://github.com/anthropics/claude-code/issues/4362).
32
+
33
+ ## Overview
34
+ Contains 80 symbols (0 exported) across 7 files.
35
+
36
+ ## Entry Points
37
+ - **`ghApi`** [function] — 4 incoming references
38
+ - **`exec`** [function] — 3 incoming references
39
+ - **`branch`** [variable] — 3 incoming references
40
+ - **`detectBreakingFromLabels`** [function] — 3 incoming references
41
+ - **`fail`** [function] — 3 incoming references
42
+
43
+ ## Dependencies
44
+ - **analyzer**: `resolve`
45
+
46
+ ## Used By
47
+ - **apps**: `parseArgs`, `generatePrPayload`
48
+
49
+ ## Files
50
+ - scripts/build-standalone.mjs
51
+ - scripts/check-console.mjs
52
+ - scripts/create-pr.cjs
53
+ - scripts/gen-build-info.mjs
54
+ - scripts/pr-generator.cjs
55
+ - scripts/smoke-test.mjs
56
+ - scripts/sync-version.mjs
@@ -1,62 +1,67 @@
1
- ---
2
- name: milens-security
3
- description: Code intelligence for the security area — symbols, dependencies, and entry points
4
- ---
5
-
6
- # Security
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
-
28
- ## Overview
29
- Contains 45 symbols (15 exported) across 2 files.
30
-
31
- ## Key Symbols
32
- - **`loadRules`** [function] (src/security/rules.ts:1302) — 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
37
- - **`Ecosystem`** [type] (src/security/deps.ts:8) — 3 refs
38
- - **`VulnerabilityReport`** [interface] (src/security/deps.ts:26) — 2 refs
39
- - **`getRulesByCategory`** [function] (src/security/rules.ts:1309) — 2 refs
40
- - **`getRulesBySeverity`** [function] (src/security/rules.ts:1313) — 2 refs
41
- - **`SecurityCategory`** [type] (src/security/rules.ts:3) — 1 refs
42
- - **`Dependency`** [interface] (src/security/deps.ts:10) — 0 refs
43
- - **`Vulnerability`** [interface] (src/security/deps.ts:16) — 0 refs
44
- - **`SecurityRule`** [interface] (src/security/rules.ts:31) — 0 refs
45
- - **`SecurityMatch`** [interface] (src/security/rules.ts:47) — 0 refs
46
- - **`SecurityReport`** [interface] (src/security/rules.ts:59) — 0 refs
47
-
48
- ## Entry Points
49
- - **`readManifest`** [function] — 6 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
54
-
55
- ## Used By
56
- - **root**: `loadRules`, `auditDependencies`
57
- - **server**: `loadRules`
58
- - **test**: `detectEcosystem`, `parseDependencies`, `checkVulnerabilities`, `auditDependencies`, `loadRules`, `getRulesByCategory`, `getRulesBySeverity`
59
-
60
- ## Files
61
- - src/security/deps.ts
62
- - src/security/rules.ts
1
+ ---
2
+ generated-by: milens
3
+ name: milens-security
4
+ description: Code intelligence for the security area — symbols, dependencies, and entry points
5
+ ---
6
+
7
+ <!-- Generated by milens — safe to delete/regenerate -->
8
+ # Security
9
+
10
+ ## Working with this area
11
+ When working with code in **security/**, follow these mandatory safety rules:
12
+
13
+ ### Before editing any symbol in this area:
14
+ 1. Call `mcp_milens_impact({target: "<symbol>", repo: "<workspaceRoot>"})` — check blast radius
15
+ 2. If depth-1 dependents > 5 → **STOP and warn** before proceeding
16
+ 3. Call `mcp_milens_context({name: "<symbol>", repo: "<workspaceRoot>"})` — see all callers/callees
17
+
18
+ ### Before committing changes in this area:
19
+ 1. Call `mcp_milens_detect_changes({repo: "<workspaceRoot>"})` — verify scope
20
+ 2. If unexpected files changed → **STOP and report**
21
+
22
+ ### Key tools for this area:
23
+ | Task | Tool |
24
+ |---|---|
25
+ | Find all references | `mcp_milens_context` |
26
+ | Check edit safety | `mcp_milens_edit_check` |
27
+ | Text search across files | `mcp_milens_grep` |
28
+ | See file symbols | `mcp_milens_get_file_symbols` |
29
+
30
+ ### Edit-safety enforcement
31
+ A `PreToolUse` hook (warn mode by default) reminds you if no milens safety check (`impact`/`context`/`overview`/`guard_edit_check`/`edit_check`/`smart_context`) was called before an `Edit`/`Write`/`MultiEdit`. Opt-in strict deny mode is available via `milens hooks guard-set-mode --mode strict`. Both modes consume the check after one edit. See `.milens/hook-state/config.json`. Known caveat: the underlying `PreToolUse` deny mechanism has at least one reliability issue (https://github.com/anthropics/claude-code/issues/4362).
32
+
33
+ ## Overview
34
+ Contains 47 symbols (17 exported) across 2 files.
35
+
36
+ ## Key Symbols
37
+ - **`loadRules`** [function] (src/security/rules.ts:1301) — 6 refs
38
+ - **`auditDependencies`** [function] (src/security/deps.ts:732) — 4 refs
39
+ - **`detectEcosystem`** [function] (src/security/deps.ts:512) — 3 refs
40
+ - **`parseDependencies`** [function] (src/security/deps.ts:524) — 3 refs
41
+ - **`checkVulnerabilities`** [function] (src/security/deps.ts:687) — 3 refs
42
+ - **`Ecosystem`** [type] (src/security/deps.ts:8) — 3 refs
43
+ - **`ALL_RULES`** [variable] (src/security/rules.ts:99) — 3 refs
44
+ - **`VulnerabilityReport`** [interface] (src/security/deps.ts:26) — 2 refs
45
+ - **`getRulesByCategory`** [function] (src/security/rules.ts:1308) — 2 refs
46
+ - **`getRulesBySeverity`** [function] (src/security/rules.ts:1312) — 2 refs
47
+ - **`SecurityCategory`** [type] (src/security/rules.ts:3) — 1 refs
48
+ - **`Dependency`** [interface] (src/security/deps.ts:10) — 0 refs
49
+ - **`Vulnerability`** [interface] (src/security/deps.ts:16) 0 refs
50
+ - **`SecurityRule`** [interface] (src/security/rules.ts:31) 0 refs
51
+ - **`SecurityMatch`** [interface] (src/security/rules.ts:47) 0 refs
52
+
53
+ ## Entry Points
54
+ - **`readManifest`** [function] — 6 incoming references
55
+ - **`loadRules`** [function] — 6 incoming references
56
+ - **`auditDependencies`** [function] — 4 incoming references
57
+ - **`detectEcosystem`** [function] — 3 incoming references
58
+ - **`parseDependencies`** [function] 3 incoming references
59
+
60
+ ## Used By
61
+ - **root**: `loadRules`, `auditDependencies`
62
+ - **server**: `loadRules`
63
+ - **test**: `detectEcosystem`, `parseDependencies`, `checkVulnerabilities`, `auditDependencies`, `loadRules`, `getRulesByCategory`, `getRulesBySeverity`
64
+
65
+ ## Files
66
+ - src/security/deps.ts
67
+ - src/security/rules.ts