Remove Anuva Prompts Implementation Log
Created: 2026-05-19 04:37 UTC
Status
Implementation completed on 2026-05-19.
flowchart LR
planned["Implementation plan"] --> runtime["Runtime prompt lookups removed"]
runtime --> schema["Payload schema and seeds removed"]
schema --> docs["Docs updated"]
docs --> verified["Targeted verification complete"]
verified --> blocked["Full-suite blockers documented"]
Code Changes
- Added code-owned prompt builders:
src/mastra/tools/presentation/prompt-builders.tssrc/mastra/tools/rag/prompt-builders.ts- Updated presentation actions to remove
src/lib/anuvax-promptsimports and prompt-record lookups. generatePresentationDescriptionnow uses a code prompt builder.generatePresentationConfigremains as a compatibility path but uses code prompt builders rather thananuva_prompts.- Per-scene voiceover/caption edits use
editAgentwith code prompts. - Scene image regeneration uses
visualAgentwith code prompts. - Updated RAG refinement actions to use code prompt builders while preserving normalized JSON parsing for
user_facing_description,asset_query,t0, andt1. - Updated
scripts/presentation-worker.tsto use scene/job prompts first and a code-owned generated-image fallback viavisualAgent. - Removed
src/lib/anuvax-prompts/render.tsandsrc/lib/anuvax-prompts/resolve.ts. - Removed
AnuvaPromptsfromAnuvaxCollections, removed prompt seed data, regeneratedsrc/payload-types.ts, and regeneratedsrc/app/(payload)/admin/importMap.js. - Added
src/migrations/20260519_000001_drop_anuva_prompts.tsand registered it insrc/migrations/index.ts.
Test And Harness Changes
- Removed integration harness mocks for legacy prompt helpers.
- Removed
resolvePromptruntime mocking. - Updated presentation assistant tests to assert code-owned prompt-builder metadata on AI interactions.
- Replaced the prompt-missing compile failure test with an agent failure test because prompt records are no longer a runtime dependency.
Docs Changes
- Updated:
docs/core/PresentationVideoWorkflow.mddocs/core/MastraAgentsAndTools.mddocs/core/PayloadDataModel.mddocs/state/CollectionMap.mddocs/state/ServerActionsMap.mddocs/state/WorkflowMap.mddocs/state/KnownGaps.md- Docs now describe code-owned Mastra prompt builders and no longer list
anuva_promptsas an active Payload collection.
Verification
node .agents/skills/mastra/scripts/provider-registry.mjs --provider openai: passed.pnpm generate:types: passed; Payload emitted a non-fatal hosted SMTP DNS warning while verifying Nodemailer transport.pnpm generate:importmap: passed; Payload emitted the same non-fatal hosted SMTP DNS warning.- Targeted Biome check on changed files: passed.
pnpm typecheck: passed.- Targeted presentation integration tests:
pnpm exec vitest run --config ./vitest.config.mts tests/integration/presentation-compile.integration.test.ts tests/integration/presentation-assistants.integration.test.ts tests/integration/presentation-failures.integration.test.ts tests/integration/presentation-scene-edit-preview.integration.test.ts- passed: 4 files, 20 tests.
- Active reference search:
- No runtime/source/test references remain for
src/lib/anuvax-prompts,resolvePrompt,renderPromptTemplate,formatRagContext, orresolveVideoUseCaseId. - Remaining
anuva_promptsreferences are in historical migrations, the new drop migration, and the change artifacts.
Verification Blockers
pnpm lintfailed on pre-existing unrelated docs issues:docs/web/stylesheets.cssuses!importantand has formatting differences.docs/_stale/archive/globals.csshas formatting differences.pnpm test:intfailed one unrelated unit assertion intests/unit/anuva-orchestration-service.test.ts.- Presentation integration tests passed.
- The failing assertion expects every generated-run action metadata record to have
artifactRefs; current service output hasagent.presentation.analyzeNarrativewith an empty artifact ref list. pnpm test:e2efailed before running tests becauseplaywright.config.tsimports packagedotenv, which is not installed in the current dependency tree.
Remaining Risks
- The drop migration is hand-authored and should be reviewed before applying to production.
generatePresentationConfigis still a large compatibility path even though it no longer reads prompt records; retiring it later would reduce duplicate generation behavior.- RAG refinement behavior now depends on code prompt wording, so production output should be spot-checked with real provider calls.