milens 0.6.4 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/adapters/SKILL.md +20 -0
- package/.agents/skills/analyzer/SKILL.md +35 -13
- package/.agents/skills/apps/SKILL.md +25 -1
- package/.agents/skills/docs/SKILL.md +32 -5
- package/.agents/skills/milens/SKILL.md +36 -6
- package/.agents/skills/milens-architect/SKILL.md +128 -0
- package/.agents/skills/milens-debugger/SKILL.md +141 -0
- package/.agents/skills/orchestrator/SKILL.md +59 -0
- package/.agents/skills/parser/SKILL.md +35 -14
- package/.agents/skills/root/SKILL.md +39 -17
- package/.agents/skills/scripts/SKILL.md +21 -3
- package/.agents/skills/security/SKILL.md +32 -11
- package/.agents/skills/server/SKILL.md +45 -19
- package/.agents/skills/store/SKILL.md +40 -18
- package/.agents/skills/test/SKILL.md +57 -9
- package/LICENSE +21 -75
- package/README.md +260 -433
- package/dist/agents-md.d.ts.map +1 -1
- package/dist/agents-md.js +5 -3
- package/dist/agents-md.js.map +1 -1
- package/dist/analyzer/engine.d.ts +1 -0
- package/dist/analyzer/engine.d.ts.map +1 -1
- package/dist/analyzer/engine.js +36 -6
- package/dist/analyzer/engine.js.map +1 -1
- package/dist/cli.js +296 -19
- package/dist/cli.js.map +1 -1
- package/dist/orchestrator/orchestrator.d.ts +65 -0
- package/dist/orchestrator/orchestrator.d.ts.map +1 -0
- package/dist/orchestrator/orchestrator.js +178 -0
- package/dist/orchestrator/orchestrator.js.map +1 -0
- package/dist/orchestrator/reporter.d.ts +15 -0
- package/dist/orchestrator/reporter.d.ts.map +1 -0
- package/dist/orchestrator/reporter.js +38 -0
- package/dist/orchestrator/reporter.js.map +1 -0
- package/dist/security/rules.d.ts.map +1 -1
- package/dist/security/rules.js +4 -1
- package/dist/security/rules.js.map +1 -1
- package/dist/server/hooks.d.ts +3 -0
- package/dist/server/hooks.d.ts.map +1 -1
- package/dist/server/hooks.js +79 -0
- package/dist/server/hooks.js.map +1 -1
- package/dist/server/mcp-prompts.d.ts.map +1 -1
- package/dist/server/mcp-prompts.js +1 -1
- package/dist/server/mcp-prompts.js.map +1 -1
- package/dist/server/mcp.d.ts.map +1 -1
- package/dist/server/mcp.js +418 -15
- package/dist/server/mcp.js.map +1 -1
- package/dist/server/watcher.d.ts +39 -0
- package/dist/server/watcher.d.ts.map +1 -0
- package/dist/server/watcher.js +134 -0
- package/dist/server/watcher.js.map +1 -0
- package/dist/skills.js +51 -7
- package/dist/skills.js.map +1 -1
- package/dist/store/annotations.d.ts.map +1 -1
- package/dist/store/annotations.js +18 -15
- package/dist/store/annotations.js.map +1 -1
- package/dist/store/confidence.d.ts +10 -0
- package/dist/store/confidence.d.ts.map +1 -1
- package/dist/store/confidence.js +28 -1
- package/dist/store/confidence.js.map +1 -1
- package/dist/store/db.d.ts +16 -0
- package/dist/store/db.d.ts.map +1 -1
- package/dist/store/db.js +121 -7
- package/dist/store/db.js.map +1 -1
- package/dist/store/schema.sql +24 -9
- package/docs/README.md +3 -5
- 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) —
|
|
14
|
-
- **`getParser`** [function] (src/parser/loader.ts:32) —
|
|
15
|
-
- **`extractFromTree`** [function] (src/parser/extract.ts:250) —
|
|
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] —
|
|
31
|
-
- **`getParser`** [function] —
|
|
32
|
-
- **`extractFromTree`** [function] —
|
|
33
|
-
- **`
|
|
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
|
|
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` (+
|
|
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
|
|
29
|
+
Contains 198 symbols (147 exported) across 13 files.
|
|
10
30
|
|
|
11
31
|
## Key Symbols
|
|
12
|
-
- **`CodeSymbol`** [interface] (src/types.ts:8) —
|
|
13
|
-
- **`SymbolLink`** [interface] (src/types.ts:26) —
|
|
14
|
-
- **`isTestFile`** [function] (src/utils.ts:2) —
|
|
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
|
-
- **`has`** [function] —
|
|
31
|
-
- **`SymbolLink`** [interface] —
|
|
32
|
-
- **`isTestFile`** [function] —
|
|
49
|
+
- **`CodeSymbol`** [interface] — 41 incoming references
|
|
50
|
+
- **`has`** [function] — 29 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` (+
|
|
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**: `
|
|
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
|
-
-
|
|
57
|
-
- TODO2.md
|
|
79
|
+
- milens-generate-skills-issue.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) —
|
|
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
|
-
- **`
|
|
17
|
-
- **`
|
|
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] —
|
|
31
|
-
- **`
|
|
32
|
-
- **`
|
|
33
|
-
- **`
|
|
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,39 +5,65 @@ 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
|
|
29
|
+
Contains 81 symbols (15 exported) across 4 files.
|
|
10
30
|
|
|
11
31
|
## Key Symbols
|
|
12
|
-
- **`
|
|
13
|
-
- **`
|
|
14
|
-
- **`
|
|
15
|
-
- **`
|
|
16
|
-
- **`
|
|
17
|
-
- **`
|
|
18
|
-
- **`
|
|
19
|
-
- **`
|
|
20
|
-
- **`
|
|
21
|
-
- **`
|
|
22
|
-
- **`
|
|
23
|
-
- **`
|
|
32
|
+
- **`HookManager`** [class] (src/server/hooks.ts:43) — 6 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:369) — 4 refs
|
|
43
|
+
- **`generateTestPlan`** [function] (src/server/test-plan.ts:14) — 4 refs
|
|
44
|
+
- **`startStdio`** [function] (src/server/mcp.ts:2716) — 2 refs
|
|
45
|
+
- **`startHttp`** [function] (src/server/mcp.ts:2724) — 2 refs
|
|
46
|
+
- **`TestPlan`** [interface] (src/server/test-plan.ts:3) — 1 refs
|
|
24
47
|
|
|
25
48
|
## Entry Points
|
|
26
|
-
- **`get`** [method] —
|
|
27
|
-
- **`
|
|
28
|
-
- **`
|
|
29
|
-
- **`HookConfig`** [interface] —
|
|
30
|
-
- **`
|
|
49
|
+
- **`get`** [method] — 9 incoming references
|
|
50
|
+
- **`HookManager`** [class] — 6 incoming references
|
|
51
|
+
- **`loadConfig`** [method] — 5 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
|
|
56
|
+
- **store**: `Database`, `AnnotationStore`, `RepoRegistry`, `runDecayPass`, `getCodebaseSummary`, `recall`, `close`, `getStats` (+37 more)
|
|
34
57
|
- **analyzer**: `reviewPr`, `resolve`, `find`
|
|
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
|
|
@@ -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
|
|
29
|
+
Contains 135 symbols (15 exported) across 5 files.
|
|
10
30
|
|
|
11
31
|
## Key Symbols
|
|
12
|
-
- **`Database`** [class] (src/store/db.ts:10) —
|
|
13
|
-
- **`AnnotationStore`** [class] (src/store/annotations.ts:10) —
|
|
14
|
-
- **`RepoRegistry`** [class] (src/store/registry.ts:18) —
|
|
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) — 9 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
|
-
- **`
|
|
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] —
|
|
29
|
-
- **`
|
|
30
|
-
- **`
|
|
31
|
-
- **`AnnotationStore`** [class] —
|
|
49
|
+
- **`Database`** [class] — 77 incoming references
|
|
50
|
+
- **`close`** [method] — 29 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` (+
|
|
41
|
-
- **analyzer**: `Database`, `TfIdfProvider`, `EmbeddingStore`, `buildEmbeddingText`, `get`, `
|
|
42
|
-
- **
|
|
43
|
-
- **
|
|
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
|
|
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
|
-
- **
|
|
37
|
-
- **
|
|
38
|
-
- **
|
|
39
|
-
- **analyzer**: `resolveLinks`, `resolveLinksWithStats`, `reviewSymbol`, `scanFiles`, `generateTestPlan`, `findCoverageGaps
|
|
40
|
-
- **
|
|
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
|