Add provider plugin architecture#1
Merged
Merged
Conversation
Introduce plugin-based provider extensibility for multi-VCS support. GitHub remains built-in; external providers (e.g., CodeCommit) are discovered as prism-provider-<name> binaries on PATH and invoked as subprocesses returning JSON to stdout. - Add --provider flag (persistent, available on all commands) - Add URL-based provider auto-detection (github.com → GitHub) - Add provider registry with built-in and plugin resolution - Add plugin executor with protocol version validation - Add plugin protocol specification (docs/provider-plugin-protocol.md) - Add ADR-0001 documenting plugin architecture decision - Update README, spec.md, architecture.md - Version bump to 0.2.0-alpha.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prism-provider-<name>binaries on PATH--providerflag for explicit provider selection (auto-detected from URL if omitted)0.2.0-alpha.1Changes
New files
internal/provider/plugin/plugin.go— Plugin executor (subprocess + JSON parse + fileutil enrichment)internal/provider/plugin/plugin_test.go— TestHelperProcess pattern testsinternal/provider/registry.go— Provider registry (built-in GitHub + PATH plugin discovery)internal/provider/registry_test.go— Auto-detection and resolution testsdocs/provider-plugin-protocol.md— Plugin protocol specification (the contract)docs/adr/0001-provider-plugin-architecture.md— Architecture decision recorddocs/implementation/v0.2.0-provider-plugin.md— Implementation guideModified files
cmd/prism/main.go— ReplacenewProvider()with registry-basedresolveProvider(), add--providerpersistent flagcmd/prism/integration_test.go— Update error assertions for auto-detection, add unknown provider testcmd/prism/main_test.go— Add--providerflag testinternal/provider/github/github.go— Remove compile-time interface check (fixes import cycle)README.md— Add Providers section with--providerusage and plugin docsdocs/spec.md— Add Global Flags section, fixPRISM_CONFIGenv var namedocs/architecture.md— Add Registry/Plugin Executor to diagram and descriptionDesign decisions (ADR-0001)
go installworks out of the boxTest plan
--providerflag exists, unknown provider error messagemake test(race),make lint,make vetall pass