framework_eng/skills/tool-usage/code-analysis/syntax-checking/SKILL.md
Before BSL handoff: LSP and full syntax check
npx skillsauth add steelmorgan/1c-agent-based-dev-framework syntax-checkingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Any change to BSL code requires immediate validation. Without checking, the agent can "successfully" complete the task with broken code.
Two levels of checking — different cost:
| Tool | Speed | When to use |
|------------|----------|-------------------|
| get_diagnostics (LSP) | Fast (seconds) | After every change, intermediate checks |
| v8-runner syntax … | Slow (dozens of seconds — minutes) | Final check: before commit, before PR, after major refactoring |
Server-side checking is now done only through the v8-runner CLI — separate MCP tools check_syntax/build_project/dump_config have been deprecated. Details of the commands and selection rules are in the v8-runner skill (framework/skills/tool-usage/v8-runner/).
| Trigger | Action |
|---------|----------|
| After changing BSL code | get_diagnostics — fast check |
| Iterative editing (edit → check loop) | get_diagnostics |
| After refactoring / rename_symbol | get_diagnostics for the affected files |
| Compilation error | get_diagnostics for localization |
| Before commit / before PR | v8-runner syntax … — final check |
| Task completion | v8-runner syntax … — final verdict |
Syntax is the minimum required, but "compiles" does not mean "high quality". After
get_diagnostics/v8-runner syntax confirm there are no errors, run a self-check
on the modified files — it is cheap (LSP, seconds) and catches what syntax misses:
| Capability | What it shows | When to use |
|------------|----------------|----------------|
| get_diagnostics | All BSL LS diagnostics for the file (more precise than workspace checks) | After edits - the full list of findings for the file |
| get_quality_diagnostics | Only security / performance / sql (query in a loop, disabling safe mode, missing aliases, etc.) | Before commit - targeted coder self-check for risks |
| get_method_complexity | Cyclomatic + cognitive complexity by method, flags threshold breaches | After writing/editing a method - a signal that it is time to refactor (cyclomatic > 20 / cognitive > 15) |
| get_module_health | Combo: complexity + security/perf/sql, aggregated by method and ranked by "what to refactor first" | Triage of the whole module in one call - instead of separate complexity + quality_diagnostics + manual aggregation |
This is coder self-checking, not a replacement for review.
get_quality_diagnostics,get_method_complexityandget_module_healthrely on BSL LS; complexity metrics require the complexity CodeLens to be enabled in the BSL LS config. For metrics of one method, useget_method_complexity; for one risk category, useget_quality_diagnostics; for triage of the entire module, useget_module_health(the individual ones do not cancel each other out).
get_diagnostics(uri) — LSP diagnostics for the changed file.error-level issue, fix it and repeat.warning — assess criticality.The choice of command depends on format/builder in v8project.yaml (see v8-runner/references/config-and-backends.md):
# Designer modules (requires Designer + Designer format)
v8-runner build
v8-runner syntax designer-modules --server --thin-client
# Designer configuration
v8-runner build
v8-runner syntax designer-config
# EDT
v8-runner build
v8-runner syntax edt
Tests (v8-runner test yaxunit …, test va) run build themselves — a separate build before them is not needed.
If LSP and v8-runner syntax disagree, rely on v8-runner as the final verdict.
| Field | Action |
|------|----------|
| success: true | Continue |
| success: false | Fix errors (each: file, line, message, severity) |
| warnings | Assess criticality |
| Timeout | Narrow the scope (--source-set <NAME>) or return to LSP for specific modules |
Severity: error (blocks compilation) > warning > information / hint.
A suppression comment is evidence, not decorative noise. From it, extract concrete codes and check whether disabling is justified.
| Tool | Syntax |
|------------|-----------|
| APK | //{ АПК:142 - comment … //} |
| BSL Language Server | // BSLLS:LineLength-off … // BSLLS:LineLength-on |
| EDT | // @suppress-warning("module-empty-method") or //@skip-check |
ask_1c_ai ("decode diagnostic APK:142"); for BSL LS — ITS documentation for the rule name; for EDT — EDT rules documentation.The comment contains neither the diagnostic code nor a reference to the standard — it must be flagged for review.
// Плохо — нет кода, нет обоснования:
// BSLLS:LineLength-off
ОченьДлиннаяСтрокаБезПояснения = ...
// BSLLS:LineLength-on
// Хорошо — код + диапазон + обоснование:
// BSLLS:LineLength-off // АПК:142: строка формирования запроса, разбиение ухудшает читаемость (ITS: стандарт 720)
ТекстЗапроса = "SELECT ... FROM ...";
// BSLLS:LineLength-on
| Capability / CLI | Purpose | Cost |
|------------------|-----------|-----------|
| get_diagnostics (MCP lsp-bsl-bridge) | LSP diagnostics for a file | Fast - the main tool |
| v8-runner syntax designer-modules | Check Designer modules through the platform | Slow - final check only |
| v8-runner syntax designer-config | Check Designer configuration | Slow |
| v8-runner syntax edt | Check an EDT project | Slow |
v8-runner syntax … can take dozens of seconds to minutes. For long runs, use the Monitor tool:
Bash run_in_background: true), redirect stdout to a log file.ERROR:|error:|Ошибок:|success - you will get a notification on the first match.error: / Ошибок: 0 / success appears in stdout.For short runs (--source-set <NAME>), Monitor is not required - a synchronous run is enough.
| Error | Workaround |
|--------|---------------|
| LSP is not running | v8-runner syntax … as a fallback |
| The syntax … command is not supported for the current format/builder | See v8-runner/references/config-and-backends.md; do not invent raw 1cv8/ibcmd flags |
| Timeout on the full check | Narrow it with --source-set <NAME>; LSP for specific modules |
| The EDT project is not found | Check format/builder and source-set in v8project.yaml |
| Unclear errors | navigate_symbol to the error location; ask_ai_assistant |
depends_on:
development
1C server maintenance webhooks: container restart and external component cache cleanup
development
Interactive DAP debugging of a single BSL procedure
tools
Rules for using RLM tools for project search and navigation in 1C/BSL
development
Creates web applications and routes on Winow (a web server on OneScript and Autumn). Use when working with a web server on OneScript, routing, or Winow controllers.