Skill v1.0.2
currentAutomated scan100/100~1 modified
version: "1.0.2" name: code-search description: "Поиск и исследование BSL-кода и точек входа 1С. Используй когда нужно найти реализацию, вызовы, обработчики, модули, поток выполнения или быстро разобраться в механизме конфигурации."
Code Search
MCP routing
- Preferred path: use MCP
unicatoolsunica.code.search,unica.code.definition,unica.code.outline,unica.code.graph,unica.meta.info, andunica.project.map. - Use object-specific
unica.*.infotools when code behavior depends on metadata, forms, DCS, roles, or HTTP service structure. - Do not call internal code-index, analyzer, or package adapters directly. They are hidden behind MCP
unica. sourceSet— это имя набора исходников изv8project.yaml, а не
константа. Получите его через unica.project.map; "main" в примерах ниже — иллюстрация, а не значение по умолчанию.
Tool choice
- MCP-first discipline: prefer the public
unica.*project-index tools before
shell search for 1C source. Use shell search only after the relevant unica.code.* / unica.meta.* attempts did not close the context gap, and report what was tried when that fallback matters to the answer.
- Use
unica.code.definitionfor an exact procedure/function definition by name, especially exported methods. - Use
unica.code.outlinebefore reading a large module; it gives regions, header context, and method ranges. - Use
unica.code.searchfor arbitrary text, XML, query fragments, string literals, captions, and non-method tokens. Read its role sections independently:semantic,symbol, thenlexical;provideronly reports the replaceable implementation that produced a section. unica.code.search.limitis the per-provider result cap:1..50, default20.- Prefer the logical selector
sourceSetfromunica.project.map; add
metadataPath to constrain the search to one logical object. The migration selector sourceDir is accepted only instead of sourceSet, never together with it, and cannot be combined with metadataPath.
- While a search is running, treat
notifications/progresswith typed
io.unica/searchProgress metadata as proof of life. Wait for the terminal result from all three roles; do not poll by starting another search.
- Interpret
searchComplete,matches.relation,ranking, andordering
together. empty proves exact zero; limitReached and timedOut preserve a lower-bound prefix and are not empty. The lexical role is deliberately unranked (ranking: none, ordering: providerTraversal).
- Inspect
terminationinstead of parsing diagnostics: it isnullfor
ok/empty, otherwise its provider-neutral code explains the terminal condition and retryable says whether repeating later can help. In particular, dependencyPending with detailCode: buildingIndex means the RLM deadline ended while the index was still building; keep results from the other roles and retry search later only if semantic evidence is still needed.
- Reuse an
addressedhit through itssourceSetandmetadataPath.
unaddressable is an observable source-relative location, not a logical target for a following mutation or subject reader.
- Use
unica.code.graphfor callers, callees, neighbors, graph overview, and impact analysis when a method or metadata node id is known or can be resolved. - Use
unica.meta.infofor a compact metadata object profile: structure, modules, roles, event subscriptions, functional options, and predefined items.
Workflow
- Map the workspace with
unica.project.mapwhen the active source-set or source format is unclear. - For an exact metadata object name, call
unica.meta.infobefore broad search to identify related modules, rights, subscriptions, and functional options. - Resolve exact method names with
unica.code.definition; inspect large candidate modules withunica.code.outline. - For flow questions, resolve the node and ask
unica.code.graphfor callers, callees, or neighbors before treating lexical hits as execution flow. - Search exact identifiers next: object names, module names, event handlers, exported procedures, command names, URL templates.
- Use
unica.code.searchfor raw text fragments that are not BSL method names and inspect its role-local sections independently, including incomplete or unavailable roles. - Broaden only after exact search fails: synonyms, business terms, common module prefixes, form command captions.
- Fall back to local
rgonly for repository files outside the public Unica index or after the MCP-first attempts above were insufficient. - For every result, separate declaration, caller, handler, graph edge, and dead-looking match. Do not infer flow from one hit.
- Report concrete file paths and line anchors; include the query that produced each important hit when the search was non-obvious.
Common searches
- Object lifecycle:
ОбработкаПроведения,ПередЗаписью,ПриЗаписи,ПриСозданииНаСервере. - Managed form flow: command handler, server procedure, client wrapper, form attribute name.
- Integrations: HTTP service root URL, method name, header name, endpoint path, exchange plan node.
- BSP entry points: exported common-module procedure plus surrounding callers.
MCP examples
{"jsonrpc": "2.0","method": "tools/call","params": {"name": "unica.project.map","arguments": {"cwd": "<workspace>"}}}
{"jsonrpc": "2.0","method": "tools/call","params": {"name": "unica.code.search","arguments": {"cwd": "<workspace>","sourceSet": "main","query": "ОбработкаПроведения","limit": 20}}}
{"jsonrpc": "2.0","method": "tools/call","params": {"name": "unica.code.graph","arguments": {"cwd": "<workspace>","mode": "callers","id": "method:CommonModule.Продажи.ОбработкаПроведения","limit": 25}}}
{"jsonrpc": "2.0","method": "tools/call","params": {"name": "unica.meta.info","arguments": {"sourceSet": "main","metadataPath": "Document.SalesOrder","sections": ["roles", "subscriptions", "functionalOptions"],"limit": 20}}}
{"jsonrpc": "2.0","method": "tools/call","params": {"name": "unica.code.definition","arguments": {"cwd": "<workspace>","name": "ОбработкаПроведения","limit": 10}}}
{"jsonrpc": "2.0","method": "tools/call","params": {"name": "unica.code.search","arguments": {"cwd": "<workspace>","sourceSet": "main","query": "ВЫБРАТЬ","limit": 20}}}