Parent epic: #304
Problem
The source generator produces a fully functional tool class from [NetclawTool] + NetclawTool<TParams>, but nothing verifies the tool is actually registered in ToolRegistrationExtensions. You can create a perfectly generated tool, forget to add it to WithFirstPartyTools() (or the appropriate registration method), and the tool silently doesn't exist at runtime. It compiles, tests pass, users can never invoke it.
Candidate rule
NCLW2001: NetclawTool implementation is not registered
- Trigger: A non-abstract class with
[NetclawTool] attribute has no corresponding Register(new XxxTool(...)) call in any ToolRegistrationExtensions method
- Severity: Warning
- Scope: Classes in
Netclaw.Actors and Netclaw.Channels (not test projects)
- Fix: Add registration call in the appropriate
With*Tools() extension method
Notes
- Channel tools (
IChannelTool) have a different registration path — the analyzer should account for that
- MCP-wrapped tools are registered dynamically and should be excluded
- May need a
[ExcludeFromRegistrationCheck] attribute for tools that are intentionally registered conditionally
Acceptance criteria
Parent epic: #304
Problem
The source generator produces a fully functional tool class from
[NetclawTool]+NetclawTool<TParams>, but nothing verifies the tool is actually registered inToolRegistrationExtensions. You can create a perfectly generated tool, forget to add it toWithFirstPartyTools()(or the appropriate registration method), and the tool silently doesn't exist at runtime. It compiles, tests pass, users can never invoke it.Candidate rule
NCLW2001: NetclawTool implementation is not registered
[NetclawTool]attribute has no correspondingRegister(new XxxTool(...))call in anyToolRegistrationExtensionsmethodNetclaw.ActorsandNetclaw.Channels(not test projects)With*Tools()extension methodNotes
IChannelTool) have a different registration path — the analyzer should account for that[ExcludeFromRegistrationCheck]attribute for tools that are intentionally registered conditionallyAcceptance criteria