Goal
Reduce the number of GAgent types in the repo by removing actors that are either dead code or stateless-shaped (AIGAgentBase<Empty>), per CLAUDE.md "Actor 即业务实体;删除优先".
Inventory (verified 2026-05-14 on feature/lark-bot)
A. Dead code — zero callers
| GAgent |
File |
Verification |
TaskBoardGAgent |
src/Aevatar.Foundation.Core/MultiAgent/TaskBoardGAgent.cs |
grep matches only own file + docs/adr/0006-multi-agent-evolution.md + audit doc + own test |
TeamManagerGAgent |
src/Aevatar.Foundation.Core/MultiAgent/TeamManagerGAgent.cs |
same — zero production callers |
Both are residue from the Multi-Agent experiment (ADR-0006). Cross-references loning's framing in discussion #568 ("ChatRuntime/Memory/Governance/TaskBoard 都不该存在").
B. Stateless伪 actors — AIGAgentBase<Empty>
| GAgent |
File |
Why suspect |
ScriptGenerateGAgent |
src/Aevatar.Studio.Hosting/Endpoints/ScriptGenerateGAgent.cs |
AIGAgentBase<Empty> — no persistent state |
WorkflowGenerateGAgent |
src/Aevatar.Studio.Hosting/Endpoints/WorkflowGenerateGAgent.cs |
same |
These wrap one-shot Studio AI generation. Empty state means no event-sourced fact is owned — they're stateless services in an actor shell.
Proposed actions
Phase 1 — delete dead code
Phase 2 — demote stateless generators
Out of scope
- Run/Session base class refactor (
LlmSessionGAgent/ResponseSessionGAgent + ServiceRunGAgent + WorkflowRunGAgent + ScriptEvolutionSessionGAgent sharing a generic base) — separate proposal; that reduces code duplication but does not reduce GAgent type count
- Merging
Service* (7 types) or Script* (5 types) — each is a distinct aggregate root; CLAUDE.md "Actor 即业务实体" forbids collapsing
Expected outcome
- GAgent type count: 25 → 21
- Cross-references issue for
/v1/messages (Path B) which intentionally adds zero new types
Risk
- Audit any external
aevatarAI/aevatar consumers for TaskBoardGAgent / TeamManagerGAgent references before deleting
- Studio integration tests against the demoted services must cover the same surface
Goal
Reduce the number of GAgent types in the repo by removing actors that are either dead code or stateless-shaped (
AIGAgentBase<Empty>), per CLAUDE.md "Actor 即业务实体;删除优先".Inventory (verified 2026-05-14 on feature/lark-bot)
A. Dead code — zero callers
TaskBoardGAgentsrc/Aevatar.Foundation.Core/MultiAgent/TaskBoardGAgent.csdocs/adr/0006-multi-agent-evolution.md+ audit doc + own testTeamManagerGAgentsrc/Aevatar.Foundation.Core/MultiAgent/TeamManagerGAgent.csBoth are residue from the Multi-Agent experiment (ADR-0006). Cross-references loning's framing in discussion #568 ("ChatRuntime/Memory/Governance/TaskBoard 都不该存在").
B. Stateless伪 actors —
AIGAgentBase<Empty>ScriptGenerateGAgentsrc/Aevatar.Studio.Hosting/Endpoints/ScriptGenerateGAgent.csAIGAgentBase<Empty>— no persistent stateWorkflowGenerateGAgentsrc/Aevatar.Studio.Hosting/Endpoints/WorkflowGenerateGAgent.csThese wrap one-shot Studio AI generation.
Emptystate means no event-sourced fact is owned — they're stateless services in an actor shell.Proposed actions
Phase 1 — delete dead code
TaskBoardGAgent,TeamManagerGAgent, their.protos (multi_agent_state.proto), ports, projectors, testsAevatar.Foundation.Core.MultiAgent.*to banned-namespace check so nobody re-adds itPhase 2 — demote stateless generators
ScriptGenerateGAgent+WorkflowGenerateGAgentinto stateless application services (e.g.IScriptGenerateService/IWorkflowGenerateService)*ActorServiceHTTP wrapper or fold it inOut of scope
LlmSessionGAgent/ResponseSessionGAgent+ServiceRunGAgent+WorkflowRunGAgent+ScriptEvolutionSessionGAgentsharing a generic base) — separate proposal; that reduces code duplication but does not reduce GAgent type countService*(7 types) orScript*(5 types) — each is a distinct aggregate root; CLAUDE.md "Actor 即业务实体" forbids collapsingExpected outcome
/v1/messages(Path B) which intentionally adds zero new typesRisk
aevatarAI/aevatarconsumers forTaskBoardGAgent/TeamManagerGAgentreferences before deleting