Pudu programming language
Menu
Package

@chrismichaelps / pudu-lang-mcp

Model Context Protocol server for Pudu language documentation and compiler tools

0.1.2Apache-2.01

InstallClose

← All contributions

feat(reference): serve Pudu 0.1.3 derives in documentation, reference, and tools #12

merged

@chrismichaelps wrote on 2026-10-07

Closes #11

Behaviour

  • Documentation: the bundled corpus is regenerated from pudu-lang v0.1.3 — the Derives and Deploying chapters, the 0.1.2 and 0.1.3 release notes, and the derives example join it (56 documents).
  • Reference: methods of exported traits and types, and implementations of an exported trait's methods, are listed, so Std.Meta's get, set, has, and attributeOr appear. Types and traits show their declarations, with derives clauses. Every export derive strategy is listed with its documentation, read from source because the compiler's JSON omits it (chrismichaelps/pudu-lang#458).
  • pudu_expand: a new tool answering the implementations a file's derives generate, through pudu expand.
  • Prompts: every prompt carries the derive rules — the clause, derivable traits, @json/@skip/@default, strategies over Std.Meta, and the Meta.collect trap (chrismichaelps/pudu-lang#457).
  • Derives in the server itself: the compiler's reference JSON is decoded through records that derives Json.Decode, and prompt specs encode through derives Json.Encode.

Fixes found while auditing

  • A built server indexed only the 19 standard-library modules bundled into itself, because a built executable sets PUDU_LIB to its own bundle (chrismichaelps/pudu-lang#460). A bundle directory is now passed over and PUDU_MCP_LIB names the library explicitly; the reference covers all 214 installed modules.
  • The instructions sent to every client named pudu_stdlib_search and pudu_stdlib_module, which never existed; they now name the real tools, and a suite checks every tool they mention.
  • The server reported version 0.1.0 while the package was 0.1.1; it now reports the manifest's version (0.1.2), pinned by test/Package/LayoutTest.

Also

  • Bounded.pudu's reader cells start from, and fall back to, one shared open-stream value, so its once-unkillable mutant is killed.

Toolchain

CI and the language range move to Pudu 0.1.3 (>=0.1.3 <0.2.0); the package version is 0.1.2.

Verification

On the published Pudu 0.1.3 archive:

  • pudu check, pudu fmt --check, and pudu lint are clean over src, test, and tools.
  • pudu test test: 22 suites, 518 assertions.
  • Mutation: every changed file scores 100% — Decode, Derives, Entry, Prompts, Services/Reference, Services/Toolchain, App/Tools/Compiler, App/Tools/Registry — and Bounded.pudu's long-standing equivalent mutant is removed by sharing its open-stream value, so it kills 27 of 27. The CI gate (--every 3 --threshold 100) kills 86 of 86 locally and passes on Linux.
  • The built server, driven over stdio: pudu_toolchain reports the installed library with 214 modules; pudu_module_reference Std.Meta lists 31 declarations including has and attributeOr; Std.Show, Std.Order, and Std.Db.Row list their derive strategies; pudu_expand answers the derived impl Eq; pudu_docs_search derives finds the Derives chapter.

Read and reply on GitHub ↗