milens 0.7.2 → 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 (52) hide show
  1. package/.agents/skills/adapters/SKILL.md +59 -59
  2. package/.agents/skills/analyzer/SKILL.md +83 -83
  3. package/.agents/skills/apps/SKILL.md +65 -65
  4. package/.agents/skills/docs/SKILL.md +63 -63
  5. package/.agents/skills/milens/SKILL.md +322 -322
  6. package/.agents/skills/milens-security-review/SKILL.md +224 -224
  7. package/.agents/skills/orchestrator/SKILL.md +64 -64
  8. package/.agents/skills/parser/SKILL.md +86 -86
  9. package/.agents/skills/root/SKILL.md +89 -89
  10. package/.agents/skills/scripts/SKILL.md +56 -56
  11. package/.agents/skills/security/SKILL.md +67 -67
  12. package/.agents/skills/server/SKILL.md +84 -84
  13. package/.agents/skills/store/SKILL.md +77 -77
  14. package/.agents/skills/test/SKILL.md +155 -155
  15. package/.agents/skills/ui/SKILL.md +56 -56
  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 -81
  23. package/adapters/claude-code/hooks/hooks.json +27 -27
  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/build-info.d.ts +2 -2
  33. package/dist/build-info.js +2 -2
  34. package/dist/cli.js +482 -482
  35. package/dist/parser/lang-css.js +9 -9
  36. package/dist/parser/lang-go.js +58 -58
  37. package/dist/parser/lang-html.js +3 -3
  38. package/dist/parser/lang-java.js +37 -37
  39. package/dist/parser/lang-js.js +105 -105
  40. package/dist/parser/lang-php.js +45 -45
  41. package/dist/parser/lang-py.js +43 -43
  42. package/dist/parser/lang-ruby.js +28 -28
  43. package/dist/parser/lang-rust.js +48 -48
  44. package/dist/parser/lang-ts.js +210 -210
  45. package/dist/server/mcp-prompts.js +502 -502
  46. package/dist/server/mcp.js +56 -56
  47. package/dist/skills.js +296 -296
  48. package/dist/store/annotations.js +1 -1
  49. package/dist/store/db.js +224 -224
  50. package/dist/store/schema.sql +144 -144
  51. package/dist/store/vectors.js +2 -2
  52. package/package.json +85 -85
@@ -14,237 +14,237 @@ const spec = {
14
14
  return true;
15
15
  },
16
16
  queries: {
17
- functions: `[
18
- (function_declaration name: (identifier) @name) @def
19
- (generator_function_declaration name: (identifier) @name) @def
20
- (lexical_declaration
21
- (variable_declarator
22
- name: (identifier) @name
23
- value: (arrow_function)
24
- )
25
- ) @def
17
+ functions: `[
18
+ (function_declaration name: (identifier) @name) @def
19
+ (generator_function_declaration name: (identifier) @name) @def
20
+ (lexical_declaration
21
+ (variable_declarator
22
+ name: (identifier) @name
23
+ value: (arrow_function)
24
+ )
25
+ ) @def
26
26
  ]`,
27
27
  classes: `(class_declaration name: (type_identifier) @name) @def`,
28
28
  methods: `(method_definition name: (property_identifier) @name) @def`,
29
29
  interfaces: `(interface_declaration name: (type_identifier) @name) @def`,
30
30
  enums: `(enum_declaration name: (identifier) @name) @def`,
31
31
  types: `(type_alias_declaration name: (type_identifier) @name) @def`,
32
- variables: `[
33
- (program (lexical_declaration
34
- (variable_declarator name: (identifier) @name))
35
- ) @def
36
- (export_statement
37
- (lexical_declaration
38
- (variable_declarator name: (identifier) @name))
39
- ) @def
32
+ variables: `[
33
+ (program (lexical_declaration
34
+ (variable_declarator name: (identifier) @name))
35
+ ) @def
36
+ (export_statement
37
+ (lexical_declaration
38
+ (variable_declarator name: (identifier) @name))
39
+ ) @def
40
40
  ]`,
41
- imports: `[
42
- (import_statement
43
- source: (string (string_fragment) @source)
44
- ) @def
45
- (call_expression
46
- function: (import)
47
- arguments: (arguments (string (string_fragment) @source))
48
- ) @def
49
- (lexical_declaration
50
- (variable_declarator
51
- value: (call_expression
52
- function: (identifier) @_req
53
- arguments: (arguments (string (string_fragment) @source))
54
- )
55
- )
56
- ) @def
41
+ imports: `[
42
+ (import_statement
43
+ source: (string (string_fragment) @source)
44
+ ) @def
45
+ (call_expression
46
+ function: (import)
47
+ arguments: (arguments (string (string_fragment) @source))
48
+ ) @def
49
+ (lexical_declaration
50
+ (variable_declarator
51
+ value: (call_expression
52
+ function: (identifier) @_req
53
+ arguments: (arguments (string (string_fragment) @source))
54
+ )
55
+ )
56
+ ) @def
57
57
  ]`,
58
- exports: `[
59
- (export_statement
60
- declaration: (function_declaration name: (identifier) @name)
61
- )
62
- (export_statement
63
- declaration: (class_declaration name: (type_identifier) @name)
64
- )
65
- (export_statement
66
- declaration: (interface_declaration name: (type_identifier) @name)
67
- )
68
- (export_statement
69
- declaration: (enum_declaration name: (identifier) @name)
70
- )
71
- (export_statement
72
- declaration: (lexical_declaration
73
- (variable_declarator name: (identifier) @name)
74
- )
75
- )
76
- (export_statement
77
- (export_clause (export_specifier name: (identifier) @name))
78
- )
79
- (export_statement
80
- declaration: (type_alias_declaration name: (type_identifier) @name)
81
- )
82
- (export_statement
83
- declaration: (generator_function_declaration name: (identifier) @name)
84
- )
85
- (export_statement
86
- value: (identifier) @name
87
- )
58
+ exports: `[
59
+ (export_statement
60
+ declaration: (function_declaration name: (identifier) @name)
61
+ )
62
+ (export_statement
63
+ declaration: (class_declaration name: (type_identifier) @name)
64
+ )
65
+ (export_statement
66
+ declaration: (interface_declaration name: (type_identifier) @name)
67
+ )
68
+ (export_statement
69
+ declaration: (enum_declaration name: (identifier) @name)
70
+ )
71
+ (export_statement
72
+ declaration: (lexical_declaration
73
+ (variable_declarator name: (identifier) @name)
74
+ )
75
+ )
76
+ (export_statement
77
+ (export_clause (export_specifier name: (identifier) @name))
78
+ )
79
+ (export_statement
80
+ declaration: (type_alias_declaration name: (type_identifier) @name)
81
+ )
82
+ (export_statement
83
+ declaration: (generator_function_declaration name: (identifier) @name)
84
+ )
85
+ (export_statement
86
+ value: (identifier) @name
87
+ )
88
88
  ]`,
89
- calls: `[
90
- (call_expression function: (identifier) @callee) @def
91
- (call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee)) @def
92
- (new_expression constructor: (identifier) @callee) @def
93
- (new_expression constructor: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
94
- (decorator (identifier) @callee) @def
95
- (decorator (call_expression arguments: (arguments (identifier) @callee))) @def
96
- (decorator (call_expression arguments: (arguments (object (pair value: (identifier) @callee))))) @def
97
- (decorator (call_expression arguments: (arguments (object (pair value: (array (identifier) @callee)))))) @def
98
- (decorator (call_expression arguments: (arguments (object (pair value: (array (object (pair value: (identifier) @callee)))))))) @def
99
- (decorator (call_expression arguments: (arguments (arrow_function body: (identifier) @callee)))) @def
100
- (decorator (call_expression arguments: (arguments (object (pair value: (arrow_function body: (identifier) @callee)))))) @def
101
- (call_expression arguments: (arguments (identifier) @callee)) @def
102
- (call_expression arguments: (arguments (object (pair value: (identifier) @callee)))) @def
103
- (call_expression arguments: (arguments (object (pair value: (array (identifier) @callee))))) @def
104
- (jsx_self_closing_element name: (identifier) @callee) @def
105
- (jsx_opening_element name: (identifier) @callee) @def
106
- (jsx_self_closing_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
107
- (jsx_opening_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
89
+ calls: `[
90
+ (call_expression function: (identifier) @callee) @def
91
+ (call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee)) @def
92
+ (new_expression constructor: (identifier) @callee) @def
93
+ (new_expression constructor: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
94
+ (decorator (identifier) @callee) @def
95
+ (decorator (call_expression arguments: (arguments (identifier) @callee))) @def
96
+ (decorator (call_expression arguments: (arguments (object (pair value: (identifier) @callee))))) @def
97
+ (decorator (call_expression arguments: (arguments (object (pair value: (array (identifier) @callee)))))) @def
98
+ (decorator (call_expression arguments: (arguments (object (pair value: (array (object (pair value: (identifier) @callee)))))))) @def
99
+ (decorator (call_expression arguments: (arguments (arrow_function body: (identifier) @callee)))) @def
100
+ (decorator (call_expression arguments: (arguments (object (pair value: (arrow_function body: (identifier) @callee)))))) @def
101
+ (call_expression arguments: (arguments (identifier) @callee)) @def
102
+ (call_expression arguments: (arguments (object (pair value: (identifier) @callee)))) @def
103
+ (call_expression arguments: (arguments (object (pair value: (array (identifier) @callee))))) @def
104
+ (jsx_self_closing_element name: (identifier) @callee) @def
105
+ (jsx_opening_element name: (identifier) @callee) @def
106
+ (jsx_self_closing_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
107
+ (jsx_opening_element name: (member_expression object: (identifier) @receiver property: (property_identifier) @callee)) @def
108
108
  ]`,
109
- heritage: `[
110
- (class_declaration
111
- name: (type_identifier) @child
112
- (class_heritage (extends_clause value: (identifier) @parent))
113
- ) @def
114
- (class_declaration
115
- name: (type_identifier) @child
116
- (class_heritage (implements_clause (type_identifier) @parent))
117
- ) @def
109
+ heritage: `[
110
+ (class_declaration
111
+ name: (type_identifier) @child
112
+ (class_heritage (extends_clause value: (identifier) @parent))
113
+ ) @def
114
+ (class_declaration
115
+ name: (type_identifier) @child
116
+ (class_heritage (implements_clause (type_identifier) @parent))
117
+ ) @def
118
118
  ]`,
119
- reExports: `[
120
- (export_statement
121
- source: (string (string_fragment) @source)
122
- (export_clause (export_specifier name: (identifier) @name))
123
- ) @def
124
- (export_statement
125
- source: (string (string_fragment) @source)
126
- "*"
127
- ) @def
119
+ reExports: `[
120
+ (export_statement
121
+ source: (string (string_fragment) @source)
122
+ (export_clause (export_specifier name: (identifier) @name))
123
+ ) @def
124
+ (export_statement
125
+ source: (string (string_fragment) @source)
126
+ "*"
127
+ ) @def
128
128
  ]`,
129
- typeBindings: `[
130
- (lexical_declaration
131
- (variable_declarator
132
- name: (identifier) @var
133
- value: (new_expression constructor: (identifier) @type)
134
- )
135
- )
136
- (lexical_declaration
137
- (variable_declarator
138
- name: (identifier) @var
139
- type: (type_annotation (type_identifier) @type)
140
- )
141
- )
142
- (required_parameter
143
- pattern: (identifier) @var
144
- type: (type_annotation (type_identifier) @type)
145
- )
146
- (public_field_definition
147
- name: (property_identifier) @var
148
- type: (type_annotation (type_identifier) @type)
149
- )
150
- (lexical_declaration
151
- (variable_declarator
152
- name: (identifier) @var
153
- type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @type)))
154
- )
155
- )
156
- (required_parameter
157
- pattern: (identifier) @var
158
- type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @type)))
159
- )
160
- (public_field_definition
161
- name: (property_identifier) @var
162
- type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @type)))
163
- )
129
+ typeBindings: `[
130
+ (lexical_declaration
131
+ (variable_declarator
132
+ name: (identifier) @var
133
+ value: (new_expression constructor: (identifier) @type)
134
+ )
135
+ )
136
+ (lexical_declaration
137
+ (variable_declarator
138
+ name: (identifier) @var
139
+ type: (type_annotation (type_identifier) @type)
140
+ )
141
+ )
142
+ (required_parameter
143
+ pattern: (identifier) @var
144
+ type: (type_annotation (type_identifier) @type)
145
+ )
146
+ (public_field_definition
147
+ name: (property_identifier) @var
148
+ type: (type_annotation (type_identifier) @type)
149
+ )
150
+ (lexical_declaration
151
+ (variable_declarator
152
+ name: (identifier) @var
153
+ type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @type)))
154
+ )
155
+ )
156
+ (required_parameter
157
+ pattern: (identifier) @var
158
+ type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @type)))
159
+ )
160
+ (public_field_definition
161
+ name: (property_identifier) @var
162
+ type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @type)))
163
+ )
164
164
  ]`,
165
- assignmentChains: `[
166
- (lexical_declaration
167
- (variable_declarator
168
- name: (identifier) @target
169
- value: (identifier) @source
170
- )
171
- )
165
+ assignmentChains: `[
166
+ (lexical_declaration
167
+ (variable_declarator
168
+ name: (identifier) @target
169
+ value: (identifier) @source
170
+ )
171
+ )
172
172
  ]`,
173
- returnTypes: `[
174
- (function_declaration
175
- name: (identifier) @name
176
- return_type: (type_annotation (type_identifier) @returnType)
177
- )
178
- (lexical_declaration
179
- (variable_declarator
180
- name: (identifier) @name
181
- value: (arrow_function
182
- return_type: (type_annotation (type_identifier) @returnType)
183
- )
184
- )
185
- )
186
- (class_declaration
187
- name: (type_identifier) @className
188
- body: (class_body
189
- (method_definition
190
- name: (property_identifier) @name
191
- return_type: (type_annotation (type_identifier) @returnType)
192
- )
193
- )
194
- )
195
- (function_declaration
196
- name: (identifier) @name
197
- return_type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @returnType)))
198
- )
199
- (lexical_declaration
200
- (variable_declarator
201
- name: (identifier) @name
202
- value: (arrow_function
203
- return_type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @returnType)))
204
- )
205
- )
206
- )
207
- (class_declaration
208
- name: (type_identifier) @className
209
- body: (class_body
210
- (method_definition
211
- name: (property_identifier) @name
212
- return_type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @returnType)))
213
- )
214
- )
215
- )
173
+ returnTypes: `[
174
+ (function_declaration
175
+ name: (identifier) @name
176
+ return_type: (type_annotation (type_identifier) @returnType)
177
+ )
178
+ (lexical_declaration
179
+ (variable_declarator
180
+ name: (identifier) @name
181
+ value: (arrow_function
182
+ return_type: (type_annotation (type_identifier) @returnType)
183
+ )
184
+ )
185
+ )
186
+ (class_declaration
187
+ name: (type_identifier) @className
188
+ body: (class_body
189
+ (method_definition
190
+ name: (property_identifier) @name
191
+ return_type: (type_annotation (type_identifier) @returnType)
192
+ )
193
+ )
194
+ )
195
+ (function_declaration
196
+ name: (identifier) @name
197
+ return_type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @returnType)))
198
+ )
199
+ (lexical_declaration
200
+ (variable_declarator
201
+ name: (identifier) @name
202
+ value: (arrow_function
203
+ return_type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @returnType)))
204
+ )
205
+ )
206
+ )
207
+ (class_declaration
208
+ name: (type_identifier) @className
209
+ body: (class_body
210
+ (method_definition
211
+ name: (property_identifier) @name
212
+ return_type: (type_annotation (generic_type type_arguments: (type_arguments (type_identifier) @returnType)))
213
+ )
214
+ )
215
+ )
216
216
  ]`,
217
- callResultBindings: `[
218
- (lexical_declaration
219
- (variable_declarator
220
- name: (identifier) @var
221
- value: (call_expression function: (identifier) @callee)
222
- )
223
- )
224
- (lexical_declaration
225
- (variable_declarator
226
- name: (identifier) @var
227
- value: (call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee))
228
- )
229
- )
217
+ callResultBindings: `[
218
+ (lexical_declaration
219
+ (variable_declarator
220
+ name: (identifier) @var
221
+ value: (call_expression function: (identifier) @callee)
222
+ )
223
+ )
224
+ (lexical_declaration
225
+ (variable_declarator
226
+ name: (identifier) @var
227
+ value: (call_expression function: (member_expression object: (_) @receiver property: (property_identifier) @callee))
228
+ )
229
+ )
230
230
  ]`,
231
231
  // Names that can only ever be locally scoped — never a project symbol, import, or
232
232
  // global — so a bare call to one of these should never be counted as "unresolved".
233
233
  // Covers: any const/let/var declarator (including array/object destructuring, e.g.
234
234
  // `const [x, setX] = useState()`, `const { onClose } = props`) and function/arrow
235
235
  // parameters (plain or destructured), regardless of nesting depth.
236
- localBindings: `[
237
- (variable_declarator name: (identifier) @name)
238
- (variable_declarator name: (array_pattern (identifier) @name))
239
- (variable_declarator name: (object_pattern (shorthand_property_identifier_pattern) @name))
240
- (variable_declarator name: (object_pattern (pair_pattern value: (identifier) @name)))
241
- (required_parameter pattern: (identifier) @name)
242
- (optional_parameter pattern: (identifier) @name)
243
- (required_parameter pattern: (object_pattern (shorthand_property_identifier_pattern) @name))
244
- (optional_parameter pattern: (object_pattern (shorthand_property_identifier_pattern) @name))
245
- (required_parameter pattern: (object_pattern (pair_pattern value: (identifier) @name)))
246
- (required_parameter pattern: (array_pattern (identifier) @name))
247
- (catch_clause parameter: (identifier) @name)
236
+ localBindings: `[
237
+ (variable_declarator name: (identifier) @name)
238
+ (variable_declarator name: (array_pattern (identifier) @name))
239
+ (variable_declarator name: (object_pattern (shorthand_property_identifier_pattern) @name))
240
+ (variable_declarator name: (object_pattern (pair_pattern value: (identifier) @name)))
241
+ (required_parameter pattern: (identifier) @name)
242
+ (optional_parameter pattern: (identifier) @name)
243
+ (required_parameter pattern: (object_pattern (shorthand_property_identifier_pattern) @name))
244
+ (optional_parameter pattern: (object_pattern (shorthand_property_identifier_pattern) @name))
245
+ (required_parameter pattern: (object_pattern (pair_pattern value: (identifier) @name)))
246
+ (required_parameter pattern: (array_pattern (identifier) @name))
247
+ (catch_clause parameter: (identifier) @name)
248
248
  ]`,
249
249
  },
250
250
  resolveImport(raw, fromFile, root, aliases) {