dotfiles-agentsRepository
On this page

Decision 030 · Pointer-based marketplace — symlink plugin assemblies, no tracked dist

Replaces the generate-and-track distribution model with pointers: the source tree IS the installable surface for Claude Code, and the only real transformation (opencode) runs at install time instead of being committed.

Context

The distribution machinery had grown far heavier than what it distributes: ~733 lines of generators (gen_marketplace.py, gen_standalone.py, gen_opencode.py) producing 530 tracked files under dist/, each lane wrapped in a drift guard, plus a filtered-assembly publish workflow — all to ship 38 primitives whose bodies already live once in primitives-core/. Every change pays the build/check/regen tax; every reviewer reads generated diffs; the eval loop has two trees that claim to be the product.

A verification pass against the current plugin docs plus a live PoC established the facts that make the machinery unnecessary for Claude Code:

The opencode lane is different in kind: its translation (stricter name regex, agent frontmatter remap, config fragment) is genuinely irreducible. But irreducible transformation does not require tracked output.

Decision

One repo serves both runtimes; nothing generated is tracked.

  1. plugins/<id>/ become thin symlink assemblies. Each plugin dir holds a hand-authored .claude-plugin/plugin.json (plus hooks.json where the plugin ships hooks); its skills/, agents/, and hooks/ entries are symlinks into primitives-core/. Multi-homing a primitive into another plugin = one more symlink. The bundles/ source dir dissolves — a bundle's README is hand-authored directly at plugins/<id>/README.md (it describes the composition, which lives there).
  2. .claude-plugin/marketplace.json moves to the repo root, hand-maintained, listing every plugin by relative source path. Claude Code installs natively from the repo — no build step.
  3. The opencode lane generates at install time. gen_opencode.py + translation.yaml stay as the one irreducible translation step, but run by the installer/consumer; dist/opencode/ is no longer tracked.
  4. READMEs travel with their skill (owner ruling, 2026-08-03). The primitives-core/standalone-readmes/ side-tree dissolves: a standalone skill's README lives at primitives-core/skills/<id>/README.md, next to the SKILL.md it documents. The standalone plugin's root README is one more symlink to it — same mechanism as everything else.
  5. A symlink lint replaces the drift-guard class. Every symlink under plugins/ must resolve inside the repo (the silent-skip failure mode above), checked in make ci. The roster (primitives-core.yaml) slims to a provenance manifest (origin/upstream/targets/disposition) — ADR 0015 enforcement continues against it.
  6. Two repos only if a tripwire fires. Split the repo when: shared-body primitives become the minority, an external consumer needs an independent release cadence, or the translation layer outgrows declarative config. Until then, one repo.

Relation to prior ADRs

Linked open decisions

Sequencing

Execution order (backlog, milestone m-0): task-2 (build plugins/ symlink assemblies + root marketplace.json + symlink lint, dist output byte-identical) → task-3 (retire dist/, generators, drift guards, plugins.yaml, skill-catalog.yaml; slim the roster) → task-4 (opencode install-time generation). The dist/generator/publish machinery stays fully operational until each retirement lands green.

Consequences

Affects

plugins/ (new home, symlink assemblies) · root .claude-plugin/marketplace.json · primitives-core/ (READMEs move into skill dirs; standalone-readmes/ dissolves) · bundles/ (dissolves into plugins/<id>/README.md) · dist/ + gen_marketplace.py + gen_standalone.py + plugins.yaml + skill-catalog.yaml + their guards (retired, task-3) · gen_opencode.py + translation.yaml (kept, run at install time, task-4) · primitives-core.yaml (slims to provenance manifest) · Makefile + tests/ · flow.yaml / docs/FLOW.md · .github/workflows/publish.yml (pending task-5) · ADR 0008 (status) · ADR 0016 (implementation surface).