Skip to main content

Module forge

Module forge 

Source
Expand description

escriba-plugin::forge — emit a plugin caixa’s published artifacts from ONE typed catalog source.

This is the generation half of the plugin substrate (Pillar 12 — generation over composition). A catalog source (<name>.escribaplugin.lisp) is one (defescribaplugin …) manifest form followed by the plugin’s escriba entry def-forms (see [escriba_lisp::catalog]). forge_plugin reads the manifest and produces a CaixaArtifacts bundle; write_plugin_caixa materializes it into <out>/<name>/… as a complete, installable caixa directory:

<out>/<name>/
├── <name>.escribaplugin.lisp   ← THE SPEC (persisted next to output)
├── caixa.lisp                  ← generated :kind Biblioteca manifest
├── escriba/plugin.lisp         ← the escriba entry (what escriba loads)
└── flake.nix                   ← minimal nix packaging

Persisting the spec into the output dir makes re-rendering idempotent and drift-detectable via git diff (CLOSED-LOOP MASS-SYNTHESIS rule #3): force a re-forge, diff, and a clean tree proves determinism.

Structs§

CaixaArtifacts
The four published artifacts of a plugin caixa, as strings.

Enums§

ForgeError

Functions§

emit_flake_nix
Render a minimal, real flake.nix for a standalone plugin caixa: a pure-source package that copies the caixa tree into $out so it can be fetched + materialized into escriba’s plugins dir. Follows the pleme-io flake-input rule (inputs.nixpkgs.follows-friendly); in the fleet, plugin caixas are consumed as flake = false source by the escribamourne distribution, so these per-plugin pins never compound into the closure.
forge_plugin
Forge a plugin caixa’s artifacts from one catalog source string.
write_plugin_caixa
Materialize a forged plugin caixa into <out>/<name>/…. Creates the directory tree and writes all four artifacts. Overwrites existing files (so a re-forge is idempotent).