{"modulePath":"github.com/GoCodeAlone/workflow","version":"v0.87.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package assembler\n\nPackage assembler composes a structurally-valid workflow scaffold from a chosen capability set (+ optional explicit modules). Pure + deterministic.\n\n## Functions\n\n```go\nfunc MarshalConfig(app *AssembledApp) ([]byte, error)\n```\nMarshalConfig renders the assembled app to workflow.yaml bytes. Pure; shared by the CLI emitter + the MC2-bis boot test (P4: avoids cmd/wfctl \\\u003c-\u003e capability/ assembler import cycle).\n\n## Types\n\n```go\ntype AssembledApp struct {\n\tModules   []config.ModuleConfig\n\tWorkflows map[string]any // {http: {server, router, routes[]?}} — P1 + crud routes\n\tRequires  config.RequiresConfig\n\tFindings  []Finding\n\tUnmatched []string\n\n\t// GlueGaps are unselected Attaches.To targets the grammar could not resolve\n\t// (NEXT_STEPS). RuntimeHooks are the Category-B runtime preconditions the\n\t// grammar documented (fired by the engine at boot; ⊥ offline-emit). Both\n\t// feed the agent wizard-state (Task 8).\n\tGlueGaps     []string\n\tRuntimeHooks []string\n}\n```\nAssembledApp is the assembler output: module instances + a workflows.http section (so http.server gets AddRouter at boot via ConfigureWorkflow — P1), required external plugins, findings (NEXT\\_STEPS), + unmatched requested caps.\n\n```go\nfunc Assemble(inv *inventory.Inventory, in AssemblyInput, reg *schema.ModuleSchemaRegistry) (*AssembledApp, error)\n```\nAssemble composes a structurally-valid scaffold from the chosen capability set (+ explicit modules). Pure: no I/O. Runs the in-process schema.ValidateConfig gate (V3, fail-closed) before returning — on validation failure returns a non-nil error and a nil \\*AssembledApp (⊥ write-on-fail).\n\n```go\ntype AssemblyInput struct {\n\tCapabilities []string         `json:\"capabilities\"`\n\tModules      []ExplicitModule `json:\"modules\"`\n\tGoal         string           `json:\"goal\"`\n}\n```\nAssemblyInput is the parsed --set payload.\n\n```go\ntype ExplicitModule struct {\n\tType   string         `json:\"type\"`\n\tName   string         `json:\"name,omitempty\"`\n\tConfig map[string]any `json:\"config,omitempty\"`\n}\n```\nExplicitModule is an agent-pinned/injected module instance.\n\n```go\ntype Finding struct {\n\tLevel   string // \"info\" | \"warn\"\n\tCode    string\n\tMessage string\n}\n```\nFinding is a NEXT\\_STEPS item (V8 honest wiring).\n\n","path":"github.com/GoCodeAlone/workflow/capability/assembler","name":"assembler","synopsis":"Package assembler composes a structurally-valid workflow scaffold from a chosen capability set (+ optional explicit modules).","isRedistributable":true}
