{"modulePath":"github.com/GoCodeAlone/workflow","version":"v0.87.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package recommend\n\nPackage recommend produces a filtered, grouped view of which plugins provide a set of requested capabilities. Pure + deterministic (design V2): no ranking (inventory carries no quality/popularity signal — design review D13).\n\nNOTE: the inventory is manifest-derived (registry manifests + sibling plugin.json checkouts); it does NOT carry runtime-factory-verified signal. Providers carry real Kind (\"registry\"|\"external\"|\"local-plugin\") + ReleaseStatus (\"released\"| \"local-only\") fields, surfaced as-is for the consumer to interpret.\n\n## Types\n\n```go\ntype CapabilityHit struct {\n\tID        string            `json:\"id\"`\n\tCategory  string            `json:\"category\"`\n\tName      string            `json:\"name\"`\n\tProviders []ProviderSummary `json:\"providers\"`\n}\n```\nCapabilityHit groups providers of one capability.\n\n```go\ntype Options struct {\n\tCapabilities         []string\n\tCategories           []string\n\tIncludeUncategorized bool\n\n\t// DefaultPlugins is the set of always-available (built-in) plugin names, used\n\t// to derive the installRequired selection-fact (D10/AS5). Injected by the\n\t// caller (e.g. from all.DefaultPlugins) so this package stays pure (⊥ a heavy\n\t// plugins/all import). A provider is installRequired when its Kind is\n\t// \"external\" or \"local-plugin\" AND its name is not in this set.\n\tDefaultPlugins []string\n}\n```\nOptions selects capabilities to recommend for.\n\n```go\ntype ProviderSummary struct {\n\tName          string `json:\"name\"`\n\tKind          string `json:\"kind\"`\n\tReleaseStatus string `json:\"releaseStatus,omitempty\"`\n\tSource        string `json:\"source,omitempty\"`\n\n\t// InstallRequired (D10) is a selection FACT: true when this provider needs\n\t// explicit install/setup — Kind is \"external\" or \"local-plugin\" AND the name\n\t// is not a built-in default. Raw Kind/ReleaseStatus above let the consumer\n\t// interpret further; ⊥ wiring-implications (M2) and ⊥ quality-rank (D13).\n\tInstallRequired bool `json:\"installRequired,omitempty\"`\n}\n```\nProviderSummary is a compact provider descriptor (real inventory fields).\n\n```go\ntype Recommendation struct {\n\tRequested    []string        `json:\"requested\"`\n\tCapabilities []CapabilityHit `json:\"capabilities\"`\n\tUnmatched    []string        `json:\"unmatched,omitempty\"`\n}\n```\nRecommendation is the filtered + grouped result.\n\n```go\nfunc Recommend(inv *inventory.Inventory, opts Options) *Recommendation\n```\nRecommend filters inv to requested capabilities and groups their providers. It is pure: it performs no ranking (the inventory carries no quality or popularity signal) and produces a deterministic ordering.\n\n```go\ntype WizardProvider struct {\n\tCapabilityID    string `json:\"capabilityId\"`\n\tCategory        string `json:\"category,omitempty\"`\n\tName            string `json:\"name\"`\n\tKind            string `json:\"kind\"`\n\tReleaseStatus   string `json:\"releaseStatus,omitempty\"`\n\tInstallRequired bool   `json:\"installRequired,omitempty\"`\n}\n```\nWizardProvider is a single provider within the wizard state, carrying the selection facts (raw Kind/ReleaseStatus + installRequired).\n\n```go\ntype WizardState struct {\n\tChosen       []WizardProvider `json:\"chosen\"`\n\tAlternatives []WizardProvider `json:\"alternatives,omitempty\"`\n\tGlueGaps     []string         `json:\"glueGaps,omitempty\"`\n\tNextSteps    []string         `json:\"nextSteps,omitempty\"`\n}\n```\nWizardState is the agent-consumable scaffold wizard state (design G4/§C4). Transport-agnostic JSON: the MCP/ACP twin is deferred to M4; M1 emits this directly so any host (CLI, agent) can consume it. It composes the chosen capability providers (+ facts) with the grammar wire's glue-gaps and Category-B runtime-hook preconditions, surfaced as actionable NextSteps.\n\n```go\nfunc BuildWizardState(rec *Recommendation, glueGaps, hooks []string) *WizardState\n```\nBuildWizardState composes a WizardState from a Recommendation. For each capability the first provider is \"chosen\" and the rest are \"alternatives\", each carrying its facts. glueGaps (unselected Attaches.To from the grammar wire) pass through; hooks (Category-B RuntimeHooks) become NextSteps, as does an explicit \"install \\\u003cname\u003e\" step for every installRequired provider.\n\n","path":"github.com/GoCodeAlone/workflow/capability/recommend","name":"recommend","synopsis":"Package recommend produces a filtered, grouped view of which plugins provide a set of requested capabilities.","isRedistributable":true}
