Project creatortrack social scripts productization

URL: https://mkdocs.justinsforge.com/memory/general/project_creatortrack_social_scripts_productization/

The Social (reference_creatortrack_social_app.md) and Scripts (reference_creatortrack_scripts_app.md) apps were built and proven against one real workspace (Gus The Bass, ws 85). The items below are known, deliberately deferred gaps a multi-tenant, multi-creator product needs before this generalizes past Justin's own brands. None are blockers to shipping the current branch; all are real, not hypothetical.

  1. Meta app review. Not required for Justin's own Gus The Bass accounts (he is the Meta app's own admin). Required before any OTHER CreatorTrack user can connect their own Instagram/Facebook accounts.
  2. TikTok Business API audit. The current Login Kit/sandbox connect only exposes views/likes/comments/shares. Real retention/watch-time data needs TikTok's Business API tier, which requires a separate audit application, not yet requested.
  3. Transcript pipeline scaling. yt-dlp auto-caption ingest hit real, session-scoped YouTube rate limiting at 515-video scale (escalating quiet-window backoff was the only strategy that converged). A larger creator's catalog, or many creators ingesting in parallel, will hit this harder. Whisper fallback is coded as a probe (isWhisperAvailable()) but not implemented; no local whisper binary or GPU exists on Console today.
  4. BYO-LLM billing for extraction/profile/generation. Every LLM call in this feature (Haiku structure extraction, Sonnet voice-card synthesis, Sonnet script generation) runs on Justin's own claude-subscription auth. A multi-tenant product needs a billing model (metered usage or bring-your-own-API-key) before this scales to creators who aren't Justin.
  5. Nullable shares migration. app.social_videos.shares is still NOT NULL DEFAULT 0 for non-Instagram platforms (Instagram got a display-layer-only honesty patch for its 6 degraded rows). Mirror the views-nullable migration pattern: drop the NOT NULL/DEFAULT, thread number | null through the upsert types, repair the same 6 already-identified rows.
  6. Raw wire-format decision. app.social_videos.raw currently stores each platform's already-MAPPED item shape, not the original API wire format, across all 4 platforms. Revisit if verbatim wire-format storage is ever needed (debugging a platform API change, re-deriving a field the mapper dropped).
  7. NoExemplarsError-style typed error. The chat tool's read-path profile-name-ambiguity check and the "no voice profile" UI banner both currently use ad hoc error handling; a real typed error class would make both paths (and any future consumer) more consistent.
  8. JSON structured-output option. Sonnet generation calls (both profile synthesis and script generation) occasionally emit unescaped inner quotes in JSON string values (quoted creator dialogue). Current fix is a prompt instruction plus a hand-written parseJsonLenient repair heuristic, one retry. A real JSON-tolerant parser, or switching to the model provider's structured-output/JSON-mode API if/when available for the subscription auth path, would close this more durably than heuristics.
  9. Cross-post ambiguous review queue. 650 ambiguous cross-post pairs (ws 85) sit in a gitignored flat-file report per workspace with only a --reject CLI to permanently dismiss one. No in-app review/triage UI exists. Needed before this is usable by anyone but a worker with shell access.
  10. Tier 3 cross-post matching (embeddings). lib/social/crosspost.ts documents a concrete, unimplemented extension point: promote a candidate using the same embedding column Scripts already populates, semantic rather than lexical similarity. Would close the residual template-collision false-positive class (same title template, different subject, e.g. "WILL MY PET BASS EAT A CRAPPIE" vs "...A CRAWFISH") that pure lexical/trigram matching cannot separate.
  11. Justin's YouTube reconnect. Impressions/CTR remain null on ws 85 pending Justin re-authing YouTube with the broader analytics scope. Not agent-actionable; needs Justin's own OAuth consent.
  12. platform/platform_target CHECK constraint duplication. app.social_videos.platform and app.generated_scripts.platform_target maintain identical CHECK lists independently. A shared core enum, or at minimum a cross-referencing comment, would prevent them drifting apart if a 5th platform is ever added.

How to apply: treat this list as a backlog, not a spec. Before starting any item, re-check the relevant reference file (reference_creatortrack_social_app.md / reference_creatortrack_scripts_app.md) for drift since this file was written, since the branch this queue was captured from had not yet merged to main.