Executive Summary: Result/Option declarations are discovered and queued correctly, but they never reach the final Go output because the pipeline never registers their plugins and the code generator clears the injected AST before writing.

Root Cause: generator.NewWithPlugins registers ResultTypePlugin/OptionTypePlugin with the pipeline without asserting DeclarationProvider, so their computed pendingDecls are never exposed; even when another caller registers them manually, Generate() calls ClearPendingDeclarations before printer runs, leaving pipeline.injectedTypesAST empty. Evidence: pkg/generator/generator.go lines 68-85 show registration without DeclarationProvider handling, and lines 196-205 print g.pipeline.GetInjectedTypesAST() immediately after Transform, but pkg/plugin/plugin.go lines 85-105 show decl accumulation only via DeclarationProvider; there is no corresponding ClearPendingDeclarations call before generator prints, so the slice is reset in Transform (line 101) and never populated afterward.

Recommended Fix: During generator.NewWithPlugins, after RegisterPlugin, detect DeclarationProvider plugins and store their interfaces so that after Transform completes you can read their pendingDecls before calling ClearPendingDeclarations. Alternatively expose Pipeline.GetInjectedTypesAST to return decls directly after Transform. Ensure generator.Generate prints pipeline.GetInjectedTypesAST() before any ClearPendingDeclarations call and only clears after printer succeeds.

Testing Strategy: Add regression golden tests covering Result/Option usage, run `go test ./tests -run Result` and full golden suite to ensure declarations appear in emitted Go.
