CurioQuest (Second-Brain)

wiki/dev-log.md

CurioQuest Dev Log

2026-06-29 — Backend generation spine and Claude Code OAuth text provider

Status: Done

What happened: The n8n workflow is now treated as a prototype/reference while the app-side backend owns the generation spine. The backend can load Supabase generation context, generate/persist book context, gate story manuscripts, revise a failed manuscript once, and generate/persist page plan, dialogue pass, activity, visual brief, and image prompts. A Claude Code OAuth text-generation provider was added so local/sample generation can use Claude subscription/OAuth flow instead of OpenAI text API calls.

Key decisions: See wiki/decisions/2026-06-29-claude-code-oauth-text-generation.md.

Tests written: App-side contract tests cover the OpenAI provider, Claude Code OAuth provider, service provider selection, prompt builders, story quality gate, and generation workflow orchestration.

Verification: 39 focused generation tests passed; website npm run typecheck passed; website npm run lint passed. Claude Code OAuth token was verified through raw claude -p and through the CurioQuest Claude adapter.

Next: Add quality gates and bounded correction loops for downstream artifacts, then wire image generation, image QC, PDF assembly, and a human review surface.