Skip to content

docs(spec): declarative plugin reconciler#52

Merged
sherodtaylor merged 3 commits into
mainfrom
feat/declarative-plugin-reconciler-spec
May 28, 2026
Merged

docs(spec): declarative plugin reconciler#52
sherodtaylor merged 3 commits into
mainfrom
feat/declarative-plugin-reconciler-spec

Conversation

@sherodtaylor
Copy link
Copy Markdown
Owner

Summary

Records the design for moving plugin install/upgrade from imperative `claude plugin install` (in `setup.sh`, no-op on upgrades) to declarative — a new `agents/_shared/plugin-manifest.json` + a `scripts/reconcile-plugins.sh` that reads it and converges `installed_plugins.json` on every pod boot via `marketplace update` → `uninstall` → `install` on drift.

Why

v0.7.0 of `matrix-channel` was published, marketplace was updated, but pods stayed on 0.6.0. Investigation (systematic-debugging skill) traced the cause to `claude plugin install` being idempotent-no-upgrade with no `--version` flag, and `setup.sh` never running `claude plugin marketplace update`.

Spec

Single doc, 357 lines: `docs/superpowers/specs/2026-05-27-declarative-plugin-reconciler-design.md`

Test plan

  • Spec self-reviewed (no placeholders, schemas concrete, file map exact, six test cases enumerated, risks called out with mitigations)
  • Post-merge: write implementation plan (`docs/superpowers/plans/...`) and dispatch via subagent-driven-development

🤖 Generated with Claude Code

infrabot added 3 commits May 27, 2026 20:50
Records the design for converting plugin install/upgrade from imperative
(claude plugin install in setup.sh, no-op when something's installed)
to declarative (agents/_shared/plugin-manifest.json read by a new
scripts/reconcile-plugins.sh on every pod boot).

Root cause for the new design: v0.7.0 of matrix-channel was published,
the marketplace was updated, but pods stayed on 0.6.0 because
`claude plugin install` is idempotent-no-upgrade and there's no
--version flag on the install command. Investigation via
systematic-debugging skill traced the gap to the missing
`claude plugin marketplace update` + uninstall-before-install pattern.

Scope:
- New agents/_shared/plugin-manifest.json (declares plugin + version)
- New scripts/reconcile-plugins.sh (reads manifest, converges install
  state via marketplace update + uninstall + install on drift)
- setup.sh's lines 73-77 replaced with a single reconciler invocation
- .mcp.json unchanged (already declarative); mcp-nats stays at
  Dockerfile build-time pin

Out of scope, called out: MCP runtime reconciliation, marketplace SHA
pinning (compatible future extension), per-agent overrides, native
Claude Code declarative install (separate upstream ask).

End-to-end target: bumping plugin-manifest.json to 0.7.0 + rolling
pods upgrades matrix-channel from 0.6.0 → 0.7.0 automatically;
running the reconciler twice produces zero diffs.
14-task bite-sized TDD plan covering:
- Phase 1: feature branch from main
- Phase 2: test harness scaffolding (PATH-shimmed claude mock)
- Phase 3-4: per-test-case implementation
  (empty manifest, missing install, in-sync, wrong version,
   marketplace registration, install failure)
- Phase 5: manifest authoring + setup.sh integration
- Phase 6: CHANGELOG entry
- Phase 7: full suite + push + PR + cluster validation

Each task uses TDD: failing test → implementation → passing test.
No placeholders. Exact code, exact commands, expected output.

Spec: docs/superpowers/specs/2026-05-27-declarative-plugin-reconciler-design.md
…manifest)

Sherod's call: don't maintain two declarative files. Drop
agents/_shared/plugin-manifest.json. The version pin lives inside the
existing settings.json.enabledPlugins map by changing the value shape
from `true` to `{ "version": "X.Y.Z" }`. Reconciler reads marketplaces
+ plugins from the same settings.json.

Spec amended in place (all manifest references gone, schema section
rewritten, file map updated). Plan amended with an AMENDMENT callout
at the top that overrides per-task references — the reconciler
algorithm, test harness shape, and task structure all stay the same;
only the source-of-truth file changes.

Backward compat: plain `true` values for enabledPlugins continue to
mean "enabled, no version pin" — the reconciler installs-if-missing
but skips drift checks on those entries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant