Skip to content

Implement plugin discovery and loader in lib/plugin-loader.cjs #192

@snipcodeit

Description

@snipcodeit

Description

Scan .mgw/plugins/ (project-local) and ~/.mgw/plugins/ (user-global) for mgw-plugin.json manifests. Validate each against the schema, load the entry point, and register into a plugin registry keyed by (name, type). Non-blocking: bad plugins log a warning and are skipped.

Acceptance Criteria

  • Implement plugin discovery and loader in lib/plugin-loader.cjs

Milestone Context

Milestone v6 — Custom Agent Templates & Plugins
Phase Phase 41: Plugin Architecture & Schema
GSD Route plan-phase
Phase Position Phase 1 of 5 in milestone

Milestone Goal

A plugin architecture that lets projects drop a .mgw/plugins/ directory with custom agent templates, triage validators, and lifecycle hooks — all loaded at runtime without patching MGW core.

Phase Goal

Define the plugin manifest schema, plugin discovery mechanism (scan .mgw/plugins/ and ~/.mgw/plugins/), and the runtime loader that validates and registers plugins at startup.

Dependencies

design-plugin-manifest-schema-mgw-pluginjson

Scope Hints

  • Estimated route: plan-phase
  • Labels: backend, plugin-system

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions