prometeu-studio/discussion/workflow/agendas/AGD-0049-pbs-lsp-import-assistance.md
bQUARKz 6e594c15d7
All checks were successful
JaCoCo Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 61.37% (17351/28272) * Branch Coverage: 52.31% (6722/12850) * Lines of Code: 28272 * Cyclomatic Complexity: 11325 #### Quality Gates Summary Output truncated.
Test / Build skipped: 15, passed: 601
Intrepid/Prometeu/Studio/pipeline/head This commit looks good
add LSP agendas
2026-07-15 07:40:45 +01:00

2.1 KiB

id ticket title status created resolved decision tags
AGD-0049 pbs-lsp-import-assistance PBS LSP Import Assistance open 2026-07-15
studio
lsp
vscode
compiler-pbs
editor
imports
completion

Pain

Domain owner: studio/lsp

PBS users do not get import-aware assistance, so discovering exported symbols and adding the right import from barrels, stdlib, or project modules remains manual.

Context

Completion already exists for local/editorial contexts, and stdlib imports are understood by the compiler pipeline. The LSP does not yet provide auto-import completion, organize imports, or import quick fixes.

Open Questions

  • Should auto-import target project modules, stdlib modules, or both in the first wave?
  • How should barrels and explicit module imports be ranked and rendered in completion?
  • Should organize imports be a code action, source action, formatter responsibility, or separate feature?

Options

Option A - Import completion only

  • Approach: Suggest symbols from known modules and include import detail, but do not edit imports automatically.
  • Pro: Low risk and improves discovery.
  • Con: Still leaves manual import edits.
  • Maintainability: Good as a stepping stone.

Option B - Auto-import and organize imports

  • Approach: Completion/code actions insert missing imports and source actions sort/remove unused imports.
  • Pro: Matches modern editor expectations.
  • Con: Requires robust module export indexing and edit placement rules.
  • Maintainability: Strong if built on a proper import graph.

Tradeoffs

Auto-import depends on knowing canonical exports and choosing an edit location. Doing that ad hoc in completion would create formatting and duplicate import issues.

Recommendation

Prefer Option B as the target, but start with import-aware suggestions plus a limited missing-import quick fix.

Discussion

This should be coordinated with code actions and formatter.

Resolution

Ainda em aberto.

Next Step

Decide first-wave import sources: stdlib only, project modules only, or both.