Skip to content

Build on SHACLC Language Server

Excluded alternative universe

This is the excluded alternative universe from the parent ADR.

This planning shorthand assumes that SHACLC Language Server jeswr/shaclc-language-server supplies the LSP foundation. This universe extracts or generalizes its VS Code-oriented boundary, then replaces its SHACL Compact Syntax pipeline with support for JSON-LD, YAML-LD, and Markdown-LD.

SHACLC Language Server is available as a published VS Code Marketplace extension, providing an installable starting point for assessing its server and extension boundaries.

Implementation checklist

  • Evaluate reusable VS Code extension and LSP boundaries, and determine whether a generic server can be extracted without retaining editor-specific assumptions.
  • Replace the SHACL Compact Syntax parsing and analysis pipeline with JSON-LD processing while preserving protocol-facing language features.
  • Build a YAML-LD syntax tree and source map from semantic values and JSON-LD paths to YAML key and value spans.
  • Extract Markdown-LD front matter, retain its document offset, and translate JSON-LD diagnostics and navigation ranges back into the Markdown buffer.
  • Integrate a JSON-LD processor with explicit context loading, local-IRI policy, relative-IRI resolution, and diagnostic-to-source-range translation.
  • Interpret @type: @id coercion to classify IRI-valued values; publish document links and Go to Definition results for every matching workspace definition.
  • Make in-memory, unsaved buffers override on-disk documents for parsing, context resolution, indexing, and navigation.
  • Add protocol and end-to-end tests for diagnostics, links, relative IRIs, single and multiple definitions, and unsaved edits through a non-VS Code client.
  • Package a generic server and editor integrations, then document independent installation and file associations beyond the Marketplace extension.

Consequences

  • Separate reusable LSP code from the SHACLC VS Code extension and its SHACL Compact Syntax assumptions.
  • Maintain the replacement JSON-LD, YAML-LD, and Markdown-LD semantic pipeline as a downstream architecture.
  • Maintain compatibility tests across the Marketplace extension and at least one non-VS Code client.
  • Establish and maintain a generic-server distribution channel in addition to the extension package.