chore: verify brain injection wired in all four routing skill handlers #32

Open
opened 2026-05-28 10:31:55 +00:00 by mathias · 0 comments
Owner

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:

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
## 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
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mathias/hyperguild#32