cli/docs/adr/0003-codeless-builds-use-the-pluginsdk-packer.md
Alex Dunmow ab21eb4e88 Build codeless artifacts through the pluginsdk packer
The codeless build, declarative validation and tar.zst packer moved to
block/pluginsdk/bnp (v0.3.10). ninja plugin build and publish call
sdkbnp.BuildCodeless; the wasm build keeps DESCRIBE extraction and uses
the SDK helpers over os.DirFS. weareblissful and the wasm fixture build
to the same sha256 as before. ADR 0003.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 23:31:10 +08:00

1.4 KiB

Codeless builds use the pluginsdk packer

The orchestrator's website factory needs to pack a codeless .bnp in its own process, and Go's internal rule kept the CLI's packer out of reach. The codeless build, the declarative validation and the tar.zst packer moved to the public bnp package of block/pluginsdk (pluginsdk ADR 0009, v0.3.10).

Decision: ninja plugin build and ninja plugin publish call sdkbnp.BuildCodeless for a codeless repo. The wasm build in internal/bnp keeps compiling the guest and extracting its manifest through DESCRIBE, then uses the same SDK helpers over os.DirFS for manifest.yaml folding, blocks/ and seed/ validation, directory collection, presentation members and packing. BuildOptions and BuildResult come from the SDK. Repo classification (IsCodelessRepo), ninja plugin verify and CodelessHookViolation stay in the CLI.

Consequences:

  • The CLI and the orchestrator produce identical bytes for the same tree. The weareblissful site and the wasm test fixture build to the same sha256 before and after the change.
  • The pluginsdk pin moves from v0.3.7 to v0.3.10.
  • Codeless validation and packing tests live in pluginsdk; the CLI keeps the build plus Verify round trips.

Keywords: plugin CLI, codeless, BuildCodeless, BuildCodelessFS, pluginsdk bnp, sdkbnp, packArtifact, Pack, os.DirFS, manifest.yaml, BNP, tar.zst, byte-identical build, website factory, WO-076