Repository navigation
Replies: 5 comments
Weekly Update — Deep Research: LSP-MCP Server Selection, Caching Design & Tier GatingWhat ChangedMajor new market signals since initial writeup:
Research Answers to Open QuestionsQ1: Start with dev-lead (code-writing) or pr-review (finding-verification) first? Recommendation: pr-review deep tier first. Rationale:
Q2: Per-run indexing cost — acceptable or need persistent/warm LSP service? Acceptable with mitigations, no sidecar needed. Key data points:
Q3: Pilot language/repo — TS in markets or Shell in .github-private? Start with Shell in .github-private (this repo). Rationale:
Q4: Which LSP-MCP server — Serena vs lsp-mcp vs agent-lsp? Recommendation: agent-lsp. Comparative analysis:
Serena has the production benchmark (AEGIS), but agent-lsp's CI-first design (Go binary, non-interactive mode, GCF token compression, 30-language CI matrix) better fits our ephemeral-runner, multi-engine architecture. Pilot agent-lsp; use Serena results as the success bar to beat. Updated Assessment
RecommendationAdvance — start the pilot. All five open questions from the original writeup now have data-backed answers. The integration path is clear: add
Sources
🤖 Researched & drafted by Mary (BMAD Strategic Business Analyst) with Claude Code |
Enhancement: LSP Integration — Cold-Start Budget, Caching Strategy & Targeted Use CasesSharpened problem & goal Context
Caching strategy for cold-start: GitHub Actions Token economics: LSP reduces tool-call tokens (fewer grep + multi-file reads needed to resolve a reference) but adds runner time. The Token Cost Observatory ( Impact / Effort
Suggested acceptance criteria
|
|
Agreed, and, we should perform a set of comparative tests that measure the speed, quality and cost of a variety of PR's with and without the LSP. If there is strong competition between two LSP options, then we can use the comparative tests to determine our selection. |
|
📋 Initiative planned by the BMAD Scrum Master (Bob). Epic #839 — Initiative: Pilot LSP (language-server) code intelligence in the agent harness — pr-review Shell first, measured go/no-go 7 stories created (inert — labelled
Open questions for review:
Review the epic and its sub-issue DAG, adjust as needed, then add |
Pilot resolved — NO-GO for Shell/bash-language-server; door left open per-languageThe Shell pilot (epic #839) is complete. On the real 20-PR corpus, LSP-on delivered no navigation-token reduction — sonnet-4-6 1.26× / opus-4-8 (prod deep tier) 1.05× aggregate, high-nav stratum a wash at ~1.0×, vs the ≥2× target. Cold-start passed. Decision: NO-GO, recorded on #845 ( The result is scoped to Shell/bash-language-server and doesn't generalize. Follow-up tracking for the languages we actually use is filed as #1124 (umbrella, inert) → #1125 Python/pyright, #1126 TypeScript-JS. The measurement harness stays in-repo, dormant, for a low-friction per-language restart. |
Uh oh!
There was an error while loading. Please reload this page.
TL;DR
Adding LSP (Language Server Protocol) tooling to our agent harness is worth piloting — it gives the agents real semantic code intelligence (go-to-definition, find-references, type resolution, diagnostics) instead of
grep+ file-reading. The clearest wins are dev-lead writing/fixing code and pr-review verifying findings across files. The one catch unique to us: LSP servers must cold-start and index on every ephemeral CI run, so it needs a caching + tier-gating strategy. It would not have helped the config/YAML/secrets incidents we hit recently — LSP raises code-intelligence, not config-intelligence.The problem it solves (in our terms)
Our agents navigate code by
grep+ reading files. That fails exactly where they operate:validateTokenin a string/comment), not semantic ones.node_modules/site-packagesor guessing → a documented source of hallucinated APIs (~20% of AI package suggestions point at libraries that don't exist).LSP replaces that with
textDocument/definition,references,hover,diagnostics,documentSymbol,rename— exact source locations + fully-resolved types, exposed to the agent as MCP tools.Quantified benefits
Why this matters to us specifically: we run a Token Cost Observatory and just had a Gemini-credits-depleted incident. A 5–34× cut on navigation-heavy turns is a direct hit to per-run token spend and rate-limit pressure.
Where it helps in our harness
rename,diagnosticsto self-check before pushing → fewer broken commits.deep/audittiers: before posting "this is undefined / breaks N callers," confirm vialsp_get_diagnostics/lsp_find_references. Directly attacks the false-positive problem (30–42% of AI-review false positives come from misreading context) — which is exactly what erodes trust in an auto-approving agent.engine.sh,review-batch.sh,compliance-audit.sh).bash-language-server+ existingshellcheckgive the agents real navigation over their own substrate.Costs / caveats specific to us
tsserver,gopls,jdtls) must cold-start + index on every run — minutes on a big repo, eating tier budgets. This is the make-or-break operational issue. Mitigations:actions/cachethe LSP index, scope to changed files, gate LSP todeep/auditonly, lazy single-file diagnostics.@v1workflow ref, channel-tag pins, the markets PAT override) — those are YAML/config/secrets, outside LSP's wheelhouse.Recommendation — phased, low-regret
markets, or Shell in.github-private) using an existing LSP-MCP server (e.g. Serena, or the 24-tool CI-verifiedlspMCP server) — don't build one.deep/audittiers and cache the index to keep cold-start off the critical path.lsp_get_diagnostics/lsp_find_referencesbefore posting — measure false-positive rate before/after.Open questions for discussion
marketsor Shell in.github-private?Sources
🤖 Researched & drafted with Claude Code
All reactions