Files
sql-server-query-ai/kb/SSE stream.md
T
ahmed mohammedandClaude Opus 4.7 8b42a0931c docs: karpathy-pattern wiki built from the spec, plan, design contract and decisions ledger
kb/ is its own wiki root: 34 pages across 7 categories, index.md catalog, log.md, AGENTS.md schema layer, and raw/ holding copies of README, the spec, the 13-task plan, the design master and the SDD ledger.

Every page cross-references 3 to 6 others and all 107 wikilinks resolve except two [["list"]] artefacts inside JSON snippets in the copied plan.

Kept separate from the repository root on purpose: its generated graph lands in kb/.ua/ instead of overwriting the code graph.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-22 12:14:05 +03:00

805 B

SSE stream

One POST to /api/analyze returns a server-sent event stream. lib/stream.ts frames events on the server and parses them in the browser, and also extracts text deltas from an OpenAI-compatible streaming response.

Four named stages are reported as they happen: digesting, proposing, judging, writing. The console shows them as 1 of 4 · Reading the plan style pills. A done frame re-enables the Analyse button; an error frame names the stage it died in, so a rejected plan reads "digesting: ..." rather than failing silently.

If the browser disconnects, in-flight model fetches are aborted and the row is stored as abandoned or partial instead of piling ghost runs onto the analyst endpoint.

Related: Analysis row lifecycle, Console runner, OpenUI report language.