Work / Open source (oraios/serena)

Serena: Ada and SPARK support for a coding-agent toolkit

Merged pull request that adds a whole language to Serena, the open-source coding-agent toolkit: Ada and SPARK through the AdaCore language server, with tests and a verified download.

Organisation
Open source (oraios/serena)
My role
Contributor; author of the pull request
Period
May 2026

Context

Serena gives coding agents symbol-level navigation and editing by talking to language servers. It supported many languages but not Ada or SPARK, so an agent working on Ada code could only treat it as text. The project had more than 31,000 GitHub stars in November 2026.

Problem

Add a language end to end: start and manage the language server, resolve symbols and references correctly, and prove it with tests that follow the project's own guide for new languages.

Approach

  • Added one Language.ADA entry that covers both Ada and SPARK: they share .ads and .adb files, and the language server tells SPARK apart by pragmas and aspects in the source.
  • The AdaCore Ada Language Server downloads automatically for five platforms (Linux x64 and arm64, macOS x64 and arm64, Windows x64), pinned to one release and checked against a SHA256 hash per platform.
  • Anyone who already has the language server from Alire, GNAT Studio or the VS Code Ada extension can point Serena at it with one setting.
  • Added a minimal GNAT test project and nine tests covering symbols, references and diagnostics.
  • Updated the README, the language documentation and the changelog.

Key decisions

One language entry for Ada and SPARK
Both use the same file types and the same language server. A second entry would duplicate configuration without changing behaviour.
Pin the download and verify its hash
A tool that fetches a binary for an agent should fetch a known release and check it, not whatever is newest.
Flag the test accommodations in the pull request
Two tests needed Ada-specific handling: references are queried on a package instead of a single-use local, and symbol names may contain spaces and dots. I wrote both down for the reviewers instead of leaving them to be found.

Outcomes

  • Merged into oraios/serena by a maintainer on 9 May 2026: 16 files changed, 454 lines added.Source: Pull request #1461
  • Nine of nine Ada tests pass, and the pull request ran the project CI on Linux, macOS and Windows.Source: Pull request #1461

Stack

  • Python
  • Language Server Protocol
  • Ada
  • SPARK
  • pytest
  • GitHub Actions