# p0146e — Comment Intent: tail to LLM

- [Architecture] Keep the slash-prefix regexes (`/agent-smith`, `/as`, `/approve`, `/reject`) — they are the deterministic UI contract that says "this is a command, not chatter." Removing them would send every webhook comment to the LLM (cost + noise). The slash is structural; what comes after is intent.
- [Architecture] Delete `PipelineAliases` (fix→fix-bug, security→security-scan, review→pr-review). The hardcoded table was exactly the anti-pattern the p0146 umbrella eliminates — "I know better than the LLM that 'security' means 'security-scan'." `LlmIntentParser` is now the single resolver, so `/agent-smith security review` and `/agent-smith fixe einen Bug von gestern` route correctly regardless of language.
- [Architecture] `IIntentParser` gains a richer entry-point `ParseToPipelineRequestAsync(input, configPath, ct)` returning the full `PipelineRequest` (pipeline + project + optional ticket). The legacy `ParseAsync(input, ct) → ParsedIntent` is kept untouched for CLI dry-run + `ExecutePipelineUseCase.BuildRequestFromLegacyInput`, so this phase has zero blast-radius on the existing CLI path.
- [Implementation] `CommentIntentParser` becomes an instance class with a constructor-injected `IIntentParser`. The post-slash body is passed verbatim to the LLM — no cmd/args split (the old `^/(?:agent-smith|as)\s+(?<cmd>\S+)(?:\s+(?<args>.+))?` regex is simplified to `^/(?:agent-smith|as)\s+(?<tail>.+)`, capturing everything after the prefix in a single tail group). `/help` is special-cased before the LLM hop — no point spending tokens on a structural branch.
- [Implementation] Register `CommentIntentParser` as singleton via subdomain `AddWebhookCommentIntent()` helper. The webhook handlers (GitHub PR, GitLab MR, Azure DevOps PR comment) are also singleton and take it as a constructor dependency; `IIntentParser` is transient but stateless (LlmIntentParser only carries DI-resolved factories + logger), so capture-at-construction is safe.
- [Implementation] Webhook handlers no longer carry a free-form `arguments` string in `WebhookResult.TriggerInput`. Instead, the trigger input is composed of `{pipeline} #{ticket?} pr:{repo}#{prNumber}` — the LLM has already extracted the ticket, so the downstream legacy re-parse path now sees structured cues rather than the raw user text.
- [Implementation] `/approve` and `/reject` paths stay structural — body text is captured verbatim into `DialogueComment` with no LLM call. Same for `/agent-smith help`.
- [TradeOff] The downstream `ExecutePipelineUseCase` legacy string overload still runs a second LLM parse on the synthesised trigger input. Retiring that double-hop is out of scope for p0146e (the YAML scope ends at "the comment handler enqueues a PipelineRequest accordingly"); when the legacy string path is removed we can pass the `PipelineRequest` directly.
- [TradeOff] The `pr-review` entry in the per-handler `AllowedPipelines` set is now dead — `LlmIntentParser`'s enum doesn't include it. Kept as-is to avoid widening the safety gate in this phase; revisit alongside the legacy-string-path retirement.
