Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:A5c ai Babysitter Plugin Compilation

From Leeroopedia
Knowledge Sources
Domains Plugin_Generation, Compilation
Last Updated 2026-10-23 00:00 GMT

Overview

A method for compiling a unified plugin source definition into harness-specific plugin packages through a build-then-compile pipeline.

Description

Plugin Compilation is the principle of transforming a single source definition into multiple harness-specific outputs. The pipeline has two stages:

  • Compiler build: Build the extensions-adapter compiler package, which contains the transformation logic. Only builds if the compiled CLI is missing.
  • Per-target compilation: For each target in the plugin.json targets map (gemini, claude-code, codex, cursor, genty), run the compiler with --target, --source, --output, --verbose, and --verify flags.

The compiler reads the unified source, transforms it for the target harness format (e.g. Claude Code's .claude/commands, Gemini's .gemini/extension), and writes per-target plugin packages.

Usage

Use this principle when supporting multiple AI harnesses from a single plugin source definition, where each harness has a different plugin format.

Theoretical Basis

The compilation is a build-then-fan-out:

// Build stage
if not exists(dist/cli.js):
    npm run build --workspace=@a5c-ai/atlas
    npm run build --workspace=@a5c-ai/extensions-adapter

// Compile stage
for target in plugin.json.targets:
    exec: node dist/cli.js compile --target <target> --source <unified> --output <output>/<target> --verbose --verify

Key property: The --verify flag validates output after compilation, ensuring the generated package is structurally correct before it leaves the pipeline.

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment