A non-empty spark asks the AI provider to prefill empty sections; user-entered content is never overwritten. prefillFailed is true when the provider errored, the spark itself is still saved
content is free-form JSON, field order is preserved in reports. complete is optional; omitting it keeps the current completion flag. skip: true marks the section visited without content
Section status is not_started (no content, even if visited or skipped), in_progress (has content, not marked complete), or complete; the percentages are 0, 50, 100
One trigger produces both report versions: standard mirrors the form content in order, enhanced is AI-consolidated prose with cross-section deduplication. Project reports are recorded in design_reports; session reports are kept in the session design state
Project scope only. Refuses to import an empty session state and refuses to overwrite existing project design content. Session-generated reports are migrated into design_reports under fresh ids, keeping their timestamps. The design state lives independently of the session record, so importing still works after the session was converted or deleted, until the state expires with the Redis TTL; 404 SESSION_NOT_FOUND is returned only when neither the session nor any design state exists
Design routes are tracked by the activity middleware: design_section_saved, design_path_chosen, design_pdf_generated, design_imported; everything else falls back to api_request.