---
id: building-the-game/005
title: Ask an agent from any section — browser-side kickoff via the AI Task Runner
epic: building-the-game
state: review
priority: 3
blocked_by: ["building-the-game/003"]
estimate: M
created: 2026-09-03
updated: 2026-09-03
claimed_by: null
claimed_at: null
delivers: []
review_artifact: site/src/components/AskAgent.astro
---

## What to do

Kris's call: the browser holds the task-runner key (`lor:taskrunner`, pasted once by a signed-in
admin, never sent to the Builder) and speaks MCP streamable HTTP straight to
`https://kris.ai-task-runner.com/` — `initialize` (keep the `Mcp-Session-Id` header) →
`notifications/initialized` → `tools/call submit_task {project: "lor", prompt}`; the id comes
back in the text as `Task queued: <id>`; `task_status` polling for the task list.

Builder: `GET /builder/context/<section>.md` — the section's prompt frame (canonical files, the
epic, the PICKUP protocol, the current values summarised) that the panel pastes above the
typed instruction.

Site: `src/lib/taskRunner.ts`, a one-time "connect your task runner" dialog, an **Ask an
agent** panel in every Building section (admin only), a task list with live status, and on
each epic page a "pick up this epic" button (this closes `workspace-dashboard/004`).

Outside the repo: the task runner's hard-coded CORS allow-list (`server.py`, Moment origins +
localhost) must gain `https://spellgrove.com`.

## Definition of done

One real kickoff whose task touches only a scratch file and shows up in `list_tasks`.

## Built (2026-09-03)

Browser-side, as Kris asked: `site/src/lib/taskRunner.ts` speaks MCP (streamable HTTP) to
`kris.ai-task-runner.com` with a key pasted once into the browser (`lor:taskrunner`); the
"Ask an agent" panel (`AskAgent.astro`) sits on every Building section, the world map and
every epic page (that one is the "pick up this epic" button workspace-dashboard/004 wanted),
visible to admins only. The Builder serves the section's frame at
`GET /builder/context/<section>.md` from `builder/prompts/`. The task runner's CORS
allow-list now includes `https://spellgrove.com` (repo `claude_task_runner`, branch `slim`,
and patched in place in the running `atr-kris` container).

Not yet done: a real kickoff — that needs Kris's own key pasted into his browser. The first
one should ask for something small and reversible.