Docs menu

Governance LSP helpers

Use gov_lsp_diagnostics and gov_lsp_hover for in-editor governance feedback.

What you will learn

  • gov_lsp_diagnostics
  • gov_lsp_hover
  • Wire into editor

Prerequisites

Surface

Imports@tmrxjd/agent-governance-system/lsp · @tmrxjd/agent-governance-system/mcp/lsp-tools.mjs
MCPgov_lsp_diagnostics · gov_lsp_hover

What this feature does

LSP tools expose diagnostics and hover for commit messages, .ags YAML, and graph ids. Agents and editors call gov_lsp_diagnostics on a path/range before commit.

How to call it

Call these MCP tools through your AGS / tower-gov host — gov_lsp_diagnostics, gov_lsp_hover.. Prefer scan/get before validate/diff, and enforce only when the change set is ready.

  1. gov_lsp_diagnostics on message or config
  2. Fix reported issues
  3. gov_lsp_hover on unknown field
  4. Re-validate
MCP: gov_lsp_diagnostics json
{ "path": "temp/commit-cap/state.json" }

What success looks like

Diagnostics list actionable issues

Hover returns schema docs

Common failure modes

Wrong path → empty

Host without lsp-tools merged

Ignoring error severity diagnostics

Related reference

AGS documentation