Summary
Add a CLI command that outputs the generated source code for a single message handler or HTTP endpoint, rather than dumping all generated code via codegen preview.
Proposed usage
# By message type name
dotnet run -- codegen preview --handler MyApp.Commands.CreateOrder
# By HTTP route
dotnet run -- codegen preview --route "POST /api/orders"
# By handler class name
dotnet run -- codegen preview --handler CreateOrderHandler
Motivation
dotnet run -- codegen preview dumps the generated code for every handler and endpoint, which can be thousands of lines in a real application. When troubleshooting a specific handler — checking middleware ordering, service resolution, transaction wrapping, or exception handling — you need to find the relevant section in a wall of output.
A targeted command would:
- Make troubleshooting faster — go directly to the handler you care about
- Enable AI-assisted tooling — coding agents can request the generated code for a specific handler to diagnose issues (middleware not applied, service location instead of inlining, missing transaction wrapping)
- Support
dotnet run -- describe-style quick diagnostics without code changes
Output should include
- The full generated handler adapter class
- Which middleware methods are woven in and their order
- How each dependency is resolved (inlined singleton, generated constructor call, or service location)
- Transaction wrapping if present
Context
The AI skills for Critter Stack plan to use this for troubleshooting Wolverine behavior in AI-assisted workflows. Being able to ask "show me the generated code for this specific handler" is a key diagnostic capability.
Summary
Add a CLI command that outputs the generated source code for a single message handler or HTTP endpoint, rather than dumping all generated code via
codegen preview.Proposed usage
Motivation
dotnet run -- codegen previewdumps the generated code for every handler and endpoint, which can be thousands of lines in a real application. When troubleshooting a specific handler — checking middleware ordering, service resolution, transaction wrapping, or exception handling — you need to find the relevant section in a wall of output.A targeted command would:
dotnet run -- describe-style quick diagnostics without code changesOutput should include
Context
The AI skills for Critter Stack plan to use this for troubleshooting Wolverine behavior in AI-assisted workflows. Being able to ask "show me the generated code for this specific handler" is a key diagnostic capability.