project creatortrack scripts app build 20260715T182232
name: CreatorTrack Scripts app: AI script generation in creator's voice description: New CreatorTrack feature (branch feat/social-data-layer-and-scripts) generating scripts in a creator's voice via embeddings + retrieval; hand-edit protection is the core product pitch. type: project
CreatorTrack is building a "Scripts" app: given a creator's ingested video/transcript corpus, it builds a retention-weighted "voice profile" (pacing, hook taxonomy, sentence-length stats, CTA patterns) and then generates new scripts via two-stage retrieval (pgvector cosine-similarity pool -> retention re-rank) + few-shot generation against Claude. Built as a task pipeline (Tasks 13-19+) on branch feat/social-data-layer-and-scripts, tested against workspace 85 ("Gus The Bass", a pet-bass-tank channel). Stack choices: @huggingface/transformers with BAAI/bge-small-en-v1.5 (384-dim), pgvector column with no ANN index at this corpus scale (~500 rows), strict-JSON generation with one retry, RLS-scoped by workspace via core.memberships.
Why: This is the first CreatorTrack feature whose entire pitch is being better than a fine-tune because outputs stay hand-editable. That means the regenerate/update flow must never silently overwrite a user's manual edits to a generated script; this was elevated to a mandatory guardrail for Task 16 (Scripts UI) mid-build, since upsertVoiceProfile/generation currently overwrite unconditionally with no destructive-action confirm.
How to apply: When touching this feature (Tasks 16+ UI, chat tool, eval gate), treat "never silently destroy a hand edit" as a hard product invariant, not a nice-to-have. Also: retrieval found the closest real exemplars correctly on an off-corpus test topic, but the generation still invented a content format that doesn't exist in the creator's catalog, flag low-similarity topics to the user rather than presenting confident output.
[auto-memory session 60d132de-4659-485c-8044-427af0ccce7f, confidence 0.70, mode staged]