Skip to the content.

Task 110 — WithTags на все контроллеры

Phase: 8 Status: done Owner: — Slug: withtags-all-controllers Studio Stage: 0 (pre-req для Orval tags-split)

Goal

Добавить .WithTags("Domain") на каждый endpoint во всех 35 контроллерах. Теги группируют endpoints по доменам в OpenAPI документе, что позволяет Orval tags-split mode генерировать per-domain TS файлы (SkillsApi.ts, MeshApi.ts, ConfigApi.ts, etc.).

Acceptance criteria

What was actually done

Tag coverage is complete: 223 operations, 0 untagged, 37 domain tags + the framework’s auto-tag Hercules.WebApi for the two non-API endpoints (/ and /agent-card.json).

Breakdown of how the 222 endpoints in Controllers/ are covered:

How Endpoints Controllers
.WithTags(...) added by this task 180 30 controllers
Already had per-endpoint .WithTags(...) 20 MeshObservability (5), TaskProgress (9), ToolRegistry (6)
Already covered by app.MapGroup(...).WithTags(...) 22 Mcp (3), Rollout (5), SecurityOps (6), System (8)

The change is purely additive — 180 insertions / 180 deletions, no route string, handler signature or return type touched.

Corrections to the plan in this file

Pre-existing issue found (not fixed here)

POST /api/skills/{id}/improve is registered twice: once in SkillsController (.WithName("ImproveSkill").WithTags("Skills")) and again in SkillLifecycleController (.WithName("ImproveSkillLifecycle").WithTags("SkillLifecycle")). ASP.NET Core resolves a duplicate route to the last registration, so the operation resolves to ImproveSkillLifecycle / SkillLifecycle, and the SkillsController metadata is dead. This is a route collision, not a tagging problem — left for a dedicated task.

Validation

Dependencies

Scope / Likely files

30 файлов в src/agent/Hercules.WebApi/Controllers/ (7 не тронуты: 4 group-tagged, 2 уже полностью покрыты per-endpoint, 1 — ToolRegistry)

Notes

Controller Tag
ChatController Chat
SkillsController Skills
SkillLifecycleController SkillLifecycle
SkillQualityController SkillQuality
SkillManifestController SkillManifest
SkillHarnessController SkillHarness
MemoryController Memory
StatsController Stats
ConfigController Config
RolloutController Rollout (already has)
MeshController Mesh
MeshObservabilityController MeshObservability (already has)
MeshProfileController MeshProfiles
LifecycleController Lifecycle
BudgetController Budget
QuotasController Quotas
AuditController Audit
LlmController LLM
A2AController A2A
BackupController Backups
FleetTemplateController FleetTemplates
GrantsController Grants
SimulationController Simulation
SloController SLOs
ApprovalController Approvals
EscalationController Escalations
ObservabilityController Observability
SelfImprovementController SelfImprovement
TaskProgressController Tasks
ContextController Context
CacheController Cache
ToolRegistryController Tools (already has)
McpController MCP (already has)
MarketplaceController Marketplace
TemplateController Templates
SecurityOpsController Security (group-level, already had)
SystemController System (group-level, already had)