internal/skills/review/handlers.go calls brain.Query(ctx, ...) before dispatching to the LLM — confirmed in code review (2026-05-28). This was the top priority from the April 2026 scope reset ("brain_query injection into skill handlers").
Status of the other three skill handlers is unverified.
Task
Audit debug, retrospective, and trainer handlers against the reference pattern in review/handlers.go:
internal/skills/trainer/handlers.go — brain injection present? (may not be applicable)
If missing, add using review as the reference. The query string should be derived from the skill's primary input (e.g. for debug: file path + error message; for retrospective: session_id + project_root).
IngestBaseURL is in Config for all skill packages (matches review pattern)
Failure is silent (error ignored with _) — intentional, brain unavailability should not block skill execution
## Context
`internal/skills/review/handlers.go` calls `brain.Query(ctx, ...)` before dispatching to the LLM — confirmed in code review (2026-05-28). This was the top priority from the April 2026 scope reset ("brain_query injection into skill handlers").
Status of the other three skill handlers is **unverified**.
## Task
Audit `debug`, `retrospective`, and `trainer` handlers against the reference pattern in `review/handlers.go`:
```go
brainCtx, _ := brain.Query(ctx, s.cfg.IngestBaseURL, <relevant query>, 3)
// ...
if brainCtx != "" {
task = brainCtx + "\n---\n\n" + task
}
```
For each handler:
- [ ] `internal/skills/debug/handlers.go` — brain injection present?
- [ ] `internal/skills/retrospective/handlers.go` — brain injection present?
- [ ] `internal/skills/trainer/handlers.go` — brain injection present? (may not be applicable)
If missing, add using review as the reference. The query string should be derived from the skill's primary input (e.g. for debug: file path + error message; for retrospective: session_id + project_root).
## Acceptance criteria
- [ ] All three handlers audited
- [ ] Any missing injection added and tested
- [ ] `task check` passes
## Notes
- `brain.Query` signature: `func Query(ctx context.Context, baseURL, query string, limit int) (string, error)`
- `IngestBaseURL` is in `Config` for all skill packages (matches review pattern)
- Failure is silent (error ignored with `_`) — intentional, brain unavailability should not block skill execution
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Context
internal/skills/review/handlers.gocallsbrain.Query(ctx, ...)before dispatching to the LLM — confirmed in code review (2026-05-28). This was the top priority from the April 2026 scope reset ("brain_query injection into skill handlers").Status of the other three skill handlers is unverified.
Task
Audit
debug,retrospective, andtrainerhandlers against the reference pattern inreview/handlers.go:For each handler:
internal/skills/debug/handlers.go— brain injection present?internal/skills/retrospective/handlers.go— brain injection present?internal/skills/trainer/handlers.go— brain injection present? (may not be applicable)If missing, add using review as the reference. The query string should be derived from the skill's primary input (e.g. for debug: file path + error message; for retrospective: session_id + project_root).
Acceptance criteria
task checkpassesNotes
brain.Querysignature:func Query(ctx context.Context, baseURL, query string, limit int) (string, error)IngestBaseURLis inConfigfor all skill packages (matches review pattern)_) — intentional, brain unavailability should not block skill execution