AI handoff
Start here before you change anything
Everything the next human or AI session needs to avoid reconstructing the project incorrectly.
What Arcana currently is
AI Saga Arcana / You Are The Song Now generates cinematic song-based images via Gemini, asynchronously through arcana_queue, billed by users.image_credits, stored in arcana_renders + Backblaze B2, shown in a personal gallery. Auth is invite-code registration + email verification. Plans gate features via users.plan_type. Stripe sells packs/subscriptions through tables that are not created by in-repo schema helpers.
Source analyzed
- Repository:
https://github.com/cubixmeow-commits/youarethesongnow - Branch:
main - Commit:
3d7f6a08304ce5a48c6628f04eacb1094fbd5c0d - VibeKB tooling source commit:
dbd9c08566e57d4b57ce2cc2bb4b0cf66d1afaeb
Where to begin reading
README.md.vibekb/project/identity.mdandsystem/mental-model.md- Diagrams view (app overview + generation pipeline)
auth_lib.php+auth_check.phparcana.image.generator.phparcana.queue.processor.cron.parallel.v3.dynamicstyle.phparcana.image.gallery.phparcana.plan_tiers.phpstripe_lib.php+arcana.stripe.endpoint.php+webhook.phpincludes/b2_helpers.php
Critical execution paths
- Register → verify → login
- Generate → queue → worker → render → credit consume → gallery
- Pricing → Checkout → webhook/success → credits/subscription
Active warnings (read these)
See memory warnings for: missing arcana_queue / notifications / Stripe / access-codes schemas; dual Stripe webhook paths; possible double credit grant; duplicate login pages; debug files exposed; plan model inconsistency; status not enforced at login; email change without re-verify.
Known uncertainties
- Which cron worker script is actually scheduled on Hostinger
- Which Stripe webhook URL is registered in the Stripe dashboard
- Whether production DB migrations match what
auth_libvsstripe_libexpect forcredit_transactions - Which landing variant (
index.phpvsindex.four.tiers.php/index.gemini.php) is mapped in production
How to update VibeKB after code changes
- Trace the changed behaviour in source (do not invent)
- Update affected
functionality/records/*.md, files, diagrams/topology if the picture changed - Add memory warnings/discoveries/changes only when meaningful
- Update
manifest.jsonprovenance (source_commit,last_verified) - Run:
``bash
php tools/validate.php
php tools/test-topology.php
php tools/generate-static.php
``
- Commit
.vibekb/, generated/docs, and any guide/tools changes — never hand-edit generated HTML
Next recommended action
Confirm on the production host: (1) which queue processor cron runs, (2) which Stripe webhook endpoint is registered, (3) that arcana_queue, Stripe tables, user_notifications, and access_codes exist with the columns the code assumes. Promote those three items from inferred/not-verified once confirmed.
Backup of prior model
Pre-rebootstrap .vibekb/ and /docs were copied to VibeKBbackup/ at the repository root and must not be modified.
Recent work sessions
-
Arcana VibeKB initialization (static HTML)
Verified from source 2026-07-21 -
VibeKB rebootstrap onto current main tooling
Inferred from source 2026-07-21