Context
Foragent introduced ICapability + ForagentTaskHandler (a DI-resolved dispatcher) in step 3 to grow the skill surface without the single-handler-per-agent pattern that the RockBot framework provides today via IAgentTaskHandler.
Upstream tracking: MarimerLLC/rockbot#283 proposes moving that dispatch pattern into the framework as IAgentSkillHandler + AddSkillHandler<T>(), with the framework auto-wiring IAgentTaskHandler and auto-populating AgentCard.Skills.
When rockbot#283 ships (estimated RockBot 0.9.x), Foragent should migrate to it.
What to delete once the framework supports it
src/Foragent.Capabilities/ICapability.cs
src/Foragent.Capabilities/ForagentTaskHandler.cs (dispatcher — framework replaces it)
src/Foragent.Capabilities/ForagentCapabilitiesServiceCollectionExtensions.cs — replaced by individual AddSkillHandler<T>() calls
ForagentCapabilities.Skills static array — framework will derive the card from registered handlers
tests/Foragent.Agent.Tests/ForagentTaskHandlerTests.cs — tests the dispatcher we're deleting
What to change
FetchPageTitleCapability and ExtractStructuredDataCapability implement IAgentSkillHandler instead of ICapability. The existing SkillDefinition / ExecuteAsync signatures are already identical in spirit, so the rename should be mechanical.
src/Foragent.Agent/Program.cs — replace agent.Services.AddForagentCapabilities() with two agent.AddSkillHandler<T>() calls; remove the manual opts.Card.Skills = [..ForagentCapabilities.Skills] assignment and the matching opts.Skills = [..] override on AddA2AHttpGateway (framework populates both sides of the card from the registered handlers).
src/Foragent.Agent/appsettings.json — Gateway:Skills can be removed entirely if it hasn't been already (it's already effectively ignored since we override at startup).
Acceptance
- Both capabilities still pass their unit tests (mocking the browser + LLM as they do today) after the migration — the
ExecuteAsync method body doesn't need to change.
- The docker-compose smoke path (Blazor → RockBot → Foragent over A2A) still returns the same results for both
fetch-page-title and extract-structured-data.
docs/framework-feedback.md gets a "Step 3 observation resolved" note linking to the delivered rockbot PR.
Do not do before upstream ships
The migration is a no-op until RockBot.A2A exposes IAgentSkillHandler. Pin this to the first RockBot release that includes rockbot#283; don't try to emulate the shape in-repo first.
Context
Foragent introduced
ICapability+ForagentTaskHandler(a DI-resolved dispatcher) in step 3 to grow the skill surface without the single-handler-per-agent pattern that the RockBot framework provides today viaIAgentTaskHandler.Upstream tracking: MarimerLLC/rockbot#283 proposes moving that dispatch pattern into the framework as
IAgentSkillHandler+AddSkillHandler<T>(), with the framework auto-wiringIAgentTaskHandlerand auto-populatingAgentCard.Skills.When rockbot#283 ships (estimated RockBot 0.9.x), Foragent should migrate to it.
What to delete once the framework supports it
src/Foragent.Capabilities/ICapability.cssrc/Foragent.Capabilities/ForagentTaskHandler.cs(dispatcher — framework replaces it)src/Foragent.Capabilities/ForagentCapabilitiesServiceCollectionExtensions.cs— replaced by individualAddSkillHandler<T>()callsForagentCapabilities.Skillsstatic array — framework will derive the card from registered handlerstests/Foragent.Agent.Tests/ForagentTaskHandlerTests.cs— tests the dispatcher we're deletingWhat to change
FetchPageTitleCapabilityandExtractStructuredDataCapabilityimplementIAgentSkillHandlerinstead ofICapability. The existingSkillDefinition/ExecuteAsyncsignatures are already identical in spirit, so the rename should be mechanical.src/Foragent.Agent/Program.cs— replaceagent.Services.AddForagentCapabilities()with twoagent.AddSkillHandler<T>()calls; remove the manualopts.Card.Skills = [..ForagentCapabilities.Skills]assignment and the matchingopts.Skills = [..]override onAddA2AHttpGateway(framework populates both sides of the card from the registered handlers).src/Foragent.Agent/appsettings.json—Gateway:Skillscan be removed entirely if it hasn't been already (it's already effectively ignored since we override at startup).Acceptance
ExecuteAsyncmethod body doesn't need to change.fetch-page-titleandextract-structured-data.docs/framework-feedback.mdgets a "Step 3 observation resolved" note linking to the delivered rockbot PR.Do not do before upstream ships
The migration is a no-op until
RockBot.A2AexposesIAgentSkillHandler. Pin this to the first RockBot release that includes rockbot#283; don't try to emulate the shape in-repo first.