agentleFS
CodySwannGTCodySwannGT/lisa/.claude/skills/implement-plugin-parity/SKILL.md

implement-plugin-parity

Skill4 starsChanged 3 months agoMITView on GitHub

This skill should be used to execute an APPROVED plugin-parity routing artifact produced by analyze-plugin. It hard-gates on `status:"approved"`, then performs only the artifact's declared deterministic actions — emitting MCP/LSP into agent variants via the existing generators/installers, enabling vendor equivalents, and scaffolding `synced-from`-stamped Lisa skills for approved reimplement cases. It reuses Lisa's existing generators/installers as black boxes and NEVER ports upstream plugin code. An un-approved or schema-invalid artifact is a no-op error.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 3 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Pre-flight validation gate: Run node scripts/plugin-routing-validate.mjs (optionally scoped with --routing-dir/--cache-root).

    line 16
  2. Distinctive:

    If the file is missing, malformed, or fails the routing-artifact schema (embedded below) → STOP with an error.

    line 23
  3. Very specific:

    If status is not exactly "approved" → STOP and print: _"Artifact is <status>, not approved.

    line 25
  4. Very specific:

    Only when status === "approved" (and the pre-flight gate passed) do you perform the actions below.

    line 29
  5. Very specific:

    After any re-point-mcp-lsp work that flows through the build, run bun run build:plugins so the agent variants regenerate deterministically, …

    line 89
  6. Very specific:

    If a routed action needs a new emission path that none of these already provides (e.g.

    line 114
  7. Very specific:

    Never port upstream plugin code.

    line 125
  8. Distinctive:

    Every scaffolded reimplement skill carries exactly:

    line 131
  9. Very specific:

    Only the artifact's declared actions were performed.

    line 144
  10. Distinctive:

    No upstream plugin source was copied.

    line 147
  11. Very specific:

    If the build was involved, bun run build:plugins is deterministic and bun run check:plugins passes.

    line 148

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Implement Plugin Parity (EXECUTION)

This skill consumes an approved routing artifact written by analyze-plugin and executes its plan. It is the execution half of the parity subsystem; the planning half (analyze-plugin) and the drift check (plugin-parity-drift) are its siblings.

Hard approval gate (do this first)

  1. Pre-flight validation gate. Run node scripts/plugin-routing-validate.mjs (optionally scoped with --routing-dir/--cache-root). If it exits non-zero → STOP; the artifact set is schema-invalid, version-stale, or trips an anti-pattern gate, and must be re-run through analyze-plugin and re-approved before implementation. Do not act on an artifact that fails this gate.
  2. Read parity/plugin-routing/<plugin>@<marketplace>.json.
  3. If the file is missing, malformed, or fails the routing-artifact schema (embedded below) → STOP with an error. Do nothing else.
  4. If status is not exactly "approved" → STOP and print: "Artifact is <status>, not approved. A human must review the matrix and flip status to approved (visible in the git diff) before implement-plugin-parity will run." Make no changes.
  5. Only when status === "approved" (and the pre-flight gate passed) do you perform the actions below.

This gate is the whole point of separating analyze from implement: nothing deterministic happens to the source tree until a human has approved the routing in the committed artifact. The gate is human/CI-enforced, not a programmatic interlock — "approval" is a committed, git-diff-visible status flag a reviewer flips, and this skill simply refuses to act unless it reads "approved". There is no separate lock; the audit trail is the git history of the artifact.

Routing artifact schema (the contract this skill validates)

The artifact this skill consumes is written by analyze-plugin; this is a compact copy of its schema so an executor reading this skill alone can validate it (the authoritative copy lives in analyze-plugin/SKILL.md and the design doc). Reject the artifact if any required field is missing or mistyped:

{
  "schemaVersion": 1,
  "plugin": "code-simplifier@claude-plugins-official", // canonical id == synced-from plugin-ref
  "pluginName": "code-simplifier",
  "marketplace": "claude-plugins-official",
  "upstreamVersion": "1.0.0",      // resolved from the cache; used for the synced-from stamp
  "analyzedAt": "2026-05-30",      // informational only
  "status": "proposed",            // "proposed" | "approved" — MUST be "approved" to run
  "components": [                  // inventory; each: { kind, id, path, classification, notes }
    { "kind": "agent", "id": "code-simplifier", "path": "agents/code-simplifier.md", "classification": "claude-agent", "notes": "" }
  ],
  "routing": {                     // exactly one entry per agent; outcome from the locked enum
    "codex":   { "outcome": "reimplement",              "actions": ["..."], "rationale": "..." },
    "cursor":  { "outcome": "claude-only",              "actions": [],      "rationale": "..." },
    "agy":     { "outcome": "reimplement",              "actions": ["..."], "rationale": "..." },
    "copilot": { "outcome": "enable-vendor-equivalent", "actions": ["..."], "rationale": "..." }
  }
}

Outcome enum (locked): already-native | re-point-mcp-lsp | enable-vendor-equivalent | claude-only | reimplement.

What it does (deterministic actions only)

For each agent's routing entry, perform only the declared actions, according to the outcome:

  • already-native — no action; the existing fan-out already covers it.
  • re-point-mcp-lsp — emit the MCP/LSP server into that agent's variant by invoking the existing generator/installer as a black box (see "Reused building blocks"). Do not hand-write variant manifests.
  • enable-vendor-equivalent — enable the agent's native equivalent in its project-scoped marketplace per the declared action.
  • claude-only — no action; documented as intentionally not ported.
  • reimplement — scaffold a Lisa-native skill stamped synced-from: <name>@<marketplace>@<upstreamVersion> (the value from the artifact). v1 scaffolds only — create the skill shell + frontmatter pin; the actual reimplementation logic is out of scope per the issue. This is the only action that creates a drift-tracked artifact.

After any re-point-mcp-lsp work that flows through the build, run bun run build:plugins so the agent variants regenerate deterministically, and confirm bun run check:plugins still passes.

Reused building blocks (cite, never reimplement)

These are invoked as black boxes — this skill never edits them and never copies upstream plugin source into them:

  • scripts/build-plugins.sh — build_plugin (Claude→Codex derive) and the per-agent fan-out (build_per_agent_variant). Triggered via bun run build:plugins.
  • scripts/generate-codex-plugin-artifacts.mjs — Codex .codex-plugin/ derivation (skills + MCP pointer + hooks).
  • scripts/generate-cursor-plugin-artifacts.mjs — Cursor variant (.mdc rules, mcp.json, native hooks).
  • scripts/generate-agy-plugin-artifacts.mjs (generateAgyVariant) — agy variant; drops .mcp.json/mcpServers (MCP is user-global only).
  • scripts/generate-copilot-plugin-artifacts.mjs — Copilot surfaces a bundled .mcp.json's servers as an inline mcpServers object on the manifest; also uniquely supports lspServers.
  • src/agy/mcp-installer.ts — agy runtime MCP delivery (~/.gemini/config/mcp_config.json, serverUrl shape, _lisaManaged tagged-merge). The non-plugin path for agy MCP.

If a routed action needs a new emission path that none of these already provides (e.g. the first LSP routed to Copilot lspServers), do not silently attempt it — that is a separate work item. Surface it, leave it for a follow-up, and complete the rest.

Placement constraints

  • Scaffolded reimplementation skills are Lisa-repo-internal and live at root .claude/skills/<name>/SKILL.md — NEVER in plugins/src/ or all/copy-overwrite/ (per PROJECT_RULES.md, same rule that keeps the parity skills root-only).
  • Never port upstream plugin code. A reimplement scaffold is a Lisa-native shell carrying the synced-from pin so plugin-parity-drift can track it; the behavior is authored separately, not copied from the upstream plugin.

The synced-from stamp

Every scaffolded reimplement skill carries exactly:

synced-from: <name>@<marketplace>@<upstreamVersion>

where the three fields come from the approved artifact's pluginName, marketplace, and upstreamVersion. This stamp is what plugin-parity-drift reads to detect when upstream has advanced past the pinned version.

Definition of done

  • The artifact was status:"approved" (otherwise this skill was a no-op error).
  • Only the artifact's declared actions were performed.
  • Any reimplement produced a root .claude/skills/<name>/SKILL.md stamped with the correct synced-from pin.
  • No upstream plugin source was copied; no generator/installer file was edited.
  • If the build was involved, bun run build:plugins is deterministic and bun run check:plugins passes.
  • Any required new emission path was flagged as a follow-up rather than improvised.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.